the arguments come from jQuery as $(this) and contain multiple elements 🙂
tried
$('#el').delegate($(this), 'click' ...
$('#el').delegate($(this).each(), 'click' ...
none work..
(function($){
$.fn.myfunction= function(){
// here i need to somehow find .a, .b., .c etc...
$('#el').delegate($(this), 'click', function(event){
});
});
});
later I’m calling it like:
jQuery(document).ready(function($){
$('.a, .b, .c').myfunction();
});
so I want my event on all new .a, .b, .c …
Depending on your code, you will need
$("xxxx").bind('click',function(e) {...});OR$("xxx").live('click', function(e) {...});.If you are on jquery v1.7, $.on() is the function to use and $.off() reverses it.