Search Results

Search found 1 results on 1 pages for 'rgraham'.

Page 1/1 | 1 

  • Get original element using .on

    - by RGraham
    When using jQuery's event delegation, is there a way to retrieve the element on which .on was called, as well as the element on which the event was called? jQuery: $(".item").on("click","a",function() { var link = $(this); // a tag var itemDiv = // what? }); HTML: <div class="item"> <a href="#">Link</a> <a href="#">Link</a> <a href="#">Link</a> <a href="#">Link</a> </div>

    Read the article

1