Assigning Multiple Classes For Click Final Result Using Jquery
I convey an click resultant that I desire to assign to to a greater extent than than ane class. The argue for this is that I'm using this resultant on dissimilar places inward my application, as well as the buttons you lot click convey dissimilar styling inward the dissimilar places.
I convey used next method as well as it worked for me. You tin guide multiple classes straightaway alongside jQuery similar this:
In this trend you lot tin assign to a greater extent than than ane degree for whatever resultant using jQuery.
Source: http://stackoverflow.com/a/10511922
Sumber http://developer-paradize.blogspot.com
I convey used next method as well as it worked for me. You tin guide multiple classes straightaway alongside jQuery similar this:
$(".class1, .class2").click(function(){ alert("clicked"); });Fiddle: http://jsfiddle.net/Afg5s/1/
In this trend you lot tin assign to a greater extent than than ane degree for whatever resultant using jQuery.
Source: http://stackoverflow.com/a/10511922
Sumber http://developer-paradize.blogspot.com
Comments
Post a Comment