...

View Full Version : How to create and populate a div dynamically?



sdsdsd
08-20-2009, 06:29 PM
On the web application tht I am working on there is report page that has variable number of rows and each row has a column that has a link "View Details". When user clicks on the link, a slide-down or a pop-up window should show up displaying a table of info that correspond to the data in the same row. The popup has to be right below the link. Right now all the divs are preloaded on the page which is not a good design. How can I do this dynamically using jQuery? Thanks.

Fumigator
08-21-2009, 05:46 PM
jQuery gives you functions append(), prepend(), after(), before().

http://docs.jquery.com/Manipulation

These are used along with selectors. So you select the link you want to add the div after, and use the after function.

sdsdsd
08-27-2009, 04:35 PM
Thank you very much! :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum