[wd_asp elements=’search’ ratio=’100%’ id=1]

Get all classes on page and show value

9th August 2013

Jquery - Variables

jquery icon

This code shows the value of each class named with .button and alerts it to the page/


$(".button").each(function(){ //show all .buttons in page
var myclass = $(this).attr('value');
alert(myclass);
});