Tuesday, November 24, 2009

[jQuery] GET id value from url in jQuery

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