How To: jQuery - Select an Element with Multiple Classes

To select an element with multiple classes, list the classes in the selector prefixed with a dot (.) and no spaces in between.

Example

HTML

<div class="a b"></div>

JavaScript

var $el = $("div.a.b");
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License