views:

45

answers:

1

So I have created a simple calendar (http://www.akapa.org/newsite/events/calendar.htm) and I have a bunch of "More Info" buttons I made from cells. In a table cell to the right are a bunch of hidden DIV's that all appear when you rollover a "More Info" button, obviously giving more details about the calendar date/event.

My problem is that I have to give an exact "top" css position to every one of these hidden div's every single time I add a new event to the calendar. I want to dynamically tell each hidden div to match the "top" css position to match the top position of each "More Info" button. How do I do that?

A: 

You should use jQuery; it makes Javascript much easier.

Using jQuery, you can write the following:

$('#' + popupId).top($('#'+tdId).offset().top);
SLaks
I'm new to jQuery, after I link the .js file in my head tag, where do I put this line of code in my HTML?
Chris Bjerken