SitePoint Sponsor

User Tag List

Results 1 to 1 of 1

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jQuery click function not working..

    [SOLVED] the code snippet below had to be placed inside the success parameter/option of $.ajax()

    ok here's my issue. i have a div with its display set to none. then after an ajax call, i use jquery to fade in this div. the content of the div includes an image that has an id = "close_msg". now, in an external js file i wrote this function to handle the clicking of that img tag

    $("#close_msg").click(function() {
    $("#ajax_msg").hide("slow");
    });

    i changed the contents of that function to an alert and still nothing works.. anyone know what i'm missing here?

    UPDATE: when i hardcode: $("#ajax_msg").hide("slow"); into the onclick event attribute it works fine. still can't make jquery pick up the event though

    thanks!
    Last edited by Tom Brokaw; Apr 25, 2007 at 15:07.


Bookmarks

Posting Permissions

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