Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-20-2009, 06:29 PM   PM User | #1
sdsdsd
New Coder

 
Join Date: Feb 2009
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
sdsdsd is an unknown quantity at this point
Question How to create and populate a div dynamically?

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.
sdsdsd is offline   Reply With Quote
Old 08-21-2009, 05:46 PM   PM User | #2
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
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.
__________________
Fumigator is offline   Reply With Quote
Old 08-27-2009, 04:35 PM   PM User | #3
sdsdsd
New Coder

 
Join Date: Feb 2009
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
sdsdsd is an unknown quantity at this point
Thank you very much!
sdsdsd is offline   Reply With Quote
Reply

Bookmarks

Tags
dynamic div, onclick link, popups

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:29 PM.


Advertisement
Log in to turn off these ads.