Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Anchor Generate by Ajax used to open jQuery window

  • 01-03-2012 11: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,072 ✭✭✭✭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,025 ✭✭✭✭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