The following small series will bring you an analysis of jQuery events. The on () method binds multiple selectors and events. I think it is quite good. I will share it with you now. For your reference
$ (Document). on ('click', '# header. top, # main. btn', function () {// code ...});
Bind multiple events to the on () method
$ ("Table. planning_grid "). on ({mouseenter: function () {// Handle mouseenter ...}, mouseleave: function () {// Handle mouseleave ...}, click: function () {// Handle click ...}}, "td ");
Bind multiple selectors and events using the on () method
$ (Document ). on ({mouseenter: function () {// Handle mouseenter ...}, mouseleave: function () {// Handle mouseleave ...}, click: function () {// Handle click ...}}, 'click', '# header. top, # main. btn ');
The above analysis shows that the on () method of jQuery events is bound to multiple selectors. Multiple events are all the content shared by Alibaba Cloud xiaobian. I hope to give you a reference, I also hope that you will support your feet.