select all classes with jquery code example

Example 1: jquery get all select options

//looping through options select with jQuery
$("#mySelectID option").each(function(){
    var thisOptionValue=$(this).val();
});

Example 2: jquery select element with two classes

$('.class1.class2') // select element that has both class1 and class2

Example 3: jquery get all classes of a div

var classes = $('#test').attr('class').split(' ');

alert(classes[0]); // first class
alert(classes[1]); // second class
alert(classes[2]); // third class

Example 4: jquery select 2 classes

$(".class1, .class2, .class3") //select classes independently