Is it possible to use jquery .on()
method instead of .delegate()
when there is no event to be listened to?
According to the .on()
documentation:
.on( events [, selector] [, data] , handler(eventObject) )
The events
argument is not optional.
The use of .on()
/.delegate()
is for elements that are added dynamically.
on
ordelegate
without an event? – BullnoseAs of jQuery 1.7, .delegate() has been superseded by the .on() method
Jquery Docs for .delegate() – Logrolling