I have an element that has focusOut event apilied to it:
$('selector').focusout(function() {
});
later i need that function removed. I tried:
$('selector').off('focusout');
but it doesn't seem to work. Any advices??
(I can't get around this, ive tried i need it removed)
Thx in advance :D
EDIT:
im useing Jquery 1.8.3
Unfortunate i can't provide fidle because I'm useing proprietary framework that has some private html tags and fidle can't read trough it
I have an element that has focusOut event apilied to it:
$('selector').focusout(function() {
});
later i need that function removed. I tried:
$('selector').off('focusout');
but it doesn't seem to work. Any advices??
(I can't get around this, ive tried i need it removed)
Thx in advance :D
EDIT:
im useing Jquery 1.8.3
Unfortunate i can't provide fidle because I'm useing proprietary framework that has some private html tags and fidle can't read trough it
Share Improve this question edited Sep 11, 2013 at 10:37 Ivan Pavić asked Sep 11, 2013 at 10:23 Ivan PavićIvan Pavić 5385 silver badges23 bronze badges 7- Have you tried .stop()? Or . clearQueue()? – Myles Commented Sep 11, 2013 at 10:26
- 2 Which jquery version are you using? – A. Wolff Commented Sep 11, 2013 at 10:26
- @Myles .stop() and clearQueue() are not event's method – A. Wolff Commented Sep 11, 2013 at 10:27
- 1 Could you provide your full code? Possibly a fiddle? – Manishearth Commented Sep 11, 2013 at 10:30
-
event.preventDefault()
can help you – Rajarshi Das Commented Sep 11, 2013 at 10:33
3 Answers
Reset to default 5The only way I can re-create your problem is with jquery 1.6.4 or below if you are using this you need to do it like this:
$('selector').bind('focusout', function() {
});
$('selector').unbind('focusout');
Try this
$('selector').unbind('focusout');
Try
$("selector").unbind("focusout");