Hi all, I'm sure I'm missing something obvious. I add prototype.js and my custom js file in the head:
<script src="prototype.js" type="text/javascript"></script> <script src="my_js_file.js" type="text/javascript"></script> my_js_file.js looks like this: Event.observe(window, 'load', loadTasks, false); function loadTasks() { var foo = $('content_menu').cumulativeOffset()[0]; alert(foo); } And in my html I have <div id="content_menu">blah</div> But when I attempt to load this page, I get a script error. I use Firebug for debugging, and it tells me: "$('content_menu').cumulativeOffset is not a function". If I substitute cumulativeOffset() for something else, say, getHeight() or getWidth(), then it works. I've tried stripping the js and the HTML down to the absolute minimum, but it still gives the same error. (In the original file, there are a BUNCH of other included scripts that do various things on the page, and the HTML is a few kilobytes in size.) So... I'm missing something blindingly obvious.... right? //Plankmeister --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---