Permalink
Browse files

make compatible with both moo and prototype

git-svn-id: https://svn.thoughtbot.com/plugins/mile_marker/trunk@205 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information...
1 parent e6522be commit e164a8a143264f5eb4d29b8d8dbb0a025df098ea cpytel committed Sep 5, 2007
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/mile_marker.rb
View
@@ -85,10 +85,14 @@ def self.initialize_mile_marker()
$('mile_'+index).toggle();
});
}
- Event.observe(window, 'load', init_miles, false);
+ if(Event.observe) {
+ Event.observe(window, 'load', init_miles, false);
+ } else {
+ if(window.addEvent) window.addEvent('domready', init_miles);
+ }
//]]>
</script>
~
end
end
-end
+end

0 comments on commit e164a8a

Please sign in to comment.