using “jQuery.event.special”
Posted: Sat Apr 25, 2015 9:40 am
I have been try to look up the bootstrap transition.js (line 50) code and figure out how it works in there . i have stumbled across a really big hurdle . the line of code thats got me stumped is the following :
now i did read the documentation https://learn.jquery.com/events/event-extensions/. but really could't understand much except the following :
bindType: // the event you want to bind with
delegateType: // the event you want to delegate with
I tried to ask a few JS coders but the only answer i got was
> Those are the special attributes for the transition end event that
> are made available for later use in transition.js.
But I SILL DON'T GET IT .
I am trying to figure out things by reading this http://benalman.com/news/2010/03/jquery-special-events/ article , but all i want to know is .... what is `$.event.special` , WHAT is the use of this line ? WHAT is its common usage ? if any of u guys have used this in any of ur projects or coded this kind of stuff it would be great if you can share your knowledge with me .
Thank you.
Gautam.
[1]: https://github.com/twbs/bootstrap/blob/ ... ion.js#L50
[2]: https://learn.jquery.com/events/event-extensions/
[3]: http://benalman.com/news/2010/03/jquery-special-events/
[4]: http://stackoverflow.com/questions/8919 ... tom-events
Code: Select all
$.event.special.bsTransitionEnd = {
bindType: $.support.transition.end,
delegateType: $.support.transition.end,
handle: function (e) {
if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
}bindType: // the event you want to bind with
delegateType: // the event you want to delegate with
I tried to ask a few JS coders but the only answer i got was
> Those are the special attributes for the transition end event that
> are made available for later use in transition.js.
But I SILL DON'T GET IT .
I am trying to figure out things by reading this http://benalman.com/news/2010/03/jquery-special-events/ article , but all i want to know is .... what is `$.event.special` , WHAT is the use of this line ? WHAT is its common usage ? if any of u guys have used this in any of ur projects or coded this kind of stuff it would be great if you can share your knowledge with me .
Thank you.
Gautam.
[1]: https://github.com/twbs/bootstrap/blob/ ... ion.js#L50
[2]: https://learn.jquery.com/events/event-extensions/
[3]: http://benalman.com/news/2010/03/jquery-special-events/
[4]: http://stackoverflow.com/questions/8919 ... tom-events