Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Anchor Generate by Ajax used to open jQuery window

Options
  • 01-03-2012 11:34am
    #1
    Registered Users 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 Posts: 19,019 ✭✭✭✭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 Posts: 11,979 ✭✭✭✭Giblet


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


  • Registered Users Posts: 601 ✭✭✭honeymonster


    Cheers lads


Advertisement