Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    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.

  • #3
    New Coder
    Join Date
    Feb 2009
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you very much!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •