I was reading through a jQuery plugin and found a weird event(at lease to me) expression like following:
$(this).find('ul:first').bind('scroll.sticky', function(e) { //some code; });
The question is what does ".sticky" mean? I only know the "scroll" part. I tried to search jQuery document but didn't found anything. Can you point me the right page?
Thanks a lot.
Alternatively, the dot symbol . means the element is a CSS class. So . row would match <div class="row"> .
Event bubbling directs an event to its intended target, and works like this: When an object (like a button) is clicked, an event is directed to the object. If an event handler is set for the object, the event handler is triggered. Then the event bubbles up (like a bubble in water) to the objects parent.
When an event reaches an element, all handlers bound to that event type for the element are fired. If there are multiple handlers registered, they will always execute in the order in which they were bound. After all handlers have executed, the event continues along the normal event propagation path.
Those are namespaced events.
Ref: https://api.jquery.com/event.namespace/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With