I have "n" different clasess
.classOne
.classTwo
.classThree
.classFour
....
.classN
I want to bind .classTwo
& unbind the rest except .ClassOne
, How Should I do that?
$("#container").off("click"); /*except classOne*/
$("#container").on("click.ClassTwo",function...
HTML
<DIV class="classOne">[Show alert]</div>
<DIV class="classTwo">[Click dont show anything]</div>
<DIV class="classThree">[Show alert]</div>
<DIV class="classFour">[Show alert]</div>
<DIV class="classFive">[Show alert]</div>
After clickin on this button, the click event deactivates for everyone excepts classOne
...(If you click it it stills shous an alert) and at the same time .classTwo
gets the capacity to show an alert after clicking
<DIV class="button">[]</div>
So, at the end the arrangement would be:
<DIV class="classOne">[Show alert]</div>
<DIV class="classTwo">[Show alert]</div>
<DIV class="classThree">[Click dont show anything]</div>
<DIV class="classFour">[Click dont show anything]</div>
<DIV class="classFive">[Click dont show anything]</div>....