Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Anchor Generate by Ajax used to open jQuery window

  • 01-03-2012 10:34AM
    #1
    Registered Users, Registered Users 2 Posts: 601 ✭✭✭


    I have an anchor link which triggers a jquery window.

    When the person selects a service from a drop down menu eg accountant all the details of that person is generated. It sends a request to service.php and this then returns all the persons details with a contact link which is meant to open the jquery window.

    For some reason because the html is generated by ajax the anchor link will not open the jQuery window. If I copy the html for the button from the service.php and place it on the page the user selects the service from it works fine (<a href="#dialog" name="modal">Contact</a> )

    Does anyone have a clue what's going on?


Comments

  • Registered Users, Registered Users 2 Posts: 19,134 ✭✭✭✭murphaph


    Have you looked at the .live() function? http://api.jquery.com/live/

    It may help you select content that hasn't yet been loaded into the DOM.


  • Registered Users, Registered Users 2 Posts: 12,027 ✭✭✭✭Giblet


    live() is deprecated (if you're using the latest version), use on, and if possible, use the delegate syntax of on.


  • Registered Users, Registered Users 2 Posts: 601 ✭✭✭honeymonster


    Cheers lads


Advertisement