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); });