Tuesday, November 24, 2009

Re: [jQuery] GET id value from url in jQuery

When someone .click(function() { ... }) on $(this), $(this) is very interesting, and I'm not saying that just because $(this).attr('href') is even more relevant to your interests.

And $(this) is also interesting when you're running through .each(function() { ... }) elements of a $('#jquery .collection_of_items'), or after $('.an_element').sideUp('slow', function() { ... }), or on most jQuery collection methods.

Michel Belleville


2009/11/24 dziobacz <aaabbbcccdaabb@gmail.com>
How can I take value of ID clicked link in jQuery ??
I have links:
<a href='deleting_posts.php?id=1' class='delete'>delete</a>
<a href='deleting_posts.php?id=2' class='delete'>delete</a>
<a href='deleting_posts.php?id=3' class='delete'>delete</a>
.................

My jQuery script:
$(document).ready( function ()
               {
                       $(".delete").click(function()
                       {
                               $.post("deleting_posts.php", { id: WHAT_HERE_?? }, function(data)
                               {
                                       ..........
                               });
                               return false;
                       });
               });

How can I take value of ID clicked link in jQuery ??

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate