score:1

Accepted answer

I assume you want the this value in the handler to be the same as the this value of the code that sets up the event? If so, you can achieve this easily with bind. Bind allows you to pre-set the this value of a function (and also, optionally curry parameters).

$('#'+target+'_HID.box.flipped:visible a').click(function(e){
        console.log('otroclick',e,this)
}.bind(this));

This will set the this value of the handler to the current this value.

And like all nice things, bind isn't supported in IE8, so you'll want to grab a shim from here if you need to support that pile.

score:0

this is working fine, I have tested this

$( "#target" ).click({a:5}, function(evt) {
  console.log( "------------" );
  console.log( this, evt );
  console.log( evt.data );
});

you can check it on http://api.jquery.com/visible-selector/

you may need to update jquery


Related Query

More Query from same tag