jQuery Tutorial for Beginners #15 - Binding & Unbinding Events

preview_player
Показать описание
Hey gang, in this jQuery tutorial for beginners, I'll show you how to bind and unbind events using jQuery. Events are at the heart of all modern web applications, and mastering them is essential to being a good front-end developer.

In this jQuery tutorial, we'll take a look at two methods - on() and off(). The former binds events to matched elements and the latter unbinds events from the matched elements.

Any questions, ask below :)

========== JavaScript for Beginners Playlist ==========

========== CSS for Beginners Playlist ==========

========== HTML for Beginners Playlist ==========

========== The Net Ninja ============

========== Social Links ==========

Рекомендации по теме
Комментарии
Автор

everything this guy does is brilliant. the best place ive found to learn code

HarryDry
Автор

5:43 why does it work if I use:
function(){...
but not if I use:
() => {...

cedric_ds
Автор

So how would you highlight one, then unhighlight it after you click another one to highlight?

majes
Автор

Why do you create a variable for the li's? Could you just not use:
$('points-of-sale li').on('click', ....

Do we create the variable because there are multiple li's in existence?

Many thanks for the videos.

keljnr
Автор

Could you tell me uses of bind and unbind?

ranjankumar
Автор

It works too ;

myList.click(function(){

})


and why?

yasincimic
Автор

why in line 7 we didn't write
$(this).off("click") ???

rofaalfons