Guys is it possible to assign Double click event to A HREF which is dynamically generated , to which i need to assign a user function with parameter that will differ for each a HREF.kindly let me know.
3 Answers
you can use class instead of id and do what Matt said.
$('.Class').live('click',function(event)
{
myFunc($(this));
});
1 Comment
Thiago
@Suresh, just class. add a 'class="something"' inside the a "father" tag. Then, on Jquery, you select the 'a' tags doing.. $(".class a"). It's a way to do that. Or just put a class on 'a' tag.
$('.generated').live('click',function(event)
{
//determine params here
myFunc(params);
});
For every 'a' tag that ends up on your page, when it is clicked, it will call myFunc with the jQuery version of itself as the paramater
1 Comment
Dead Programmer
each A href has an id , i do not want to assign the function for all link ,only to dynamically generated ones , and function parameters changes for each links.