is there any difference between the following two methods? is #1 faster than #2 ?
#1
$(\'#selector\').on(\'click\',function(){
$(this)...
// do stuff with cl
Seems like they are equivalent in most cases, though "this" seems easier to type
according to http://api.jquery.com/event.currentTarget/
event.currentTarget
This property will typically be equal to the
this
of the function.If you are using jQuery.proxy or another form of scope manipulation,
this
will be equal to whatever context you have provided, notevent.currentTarget