I can’t understant if it is my use of hasClass or an issue with my var sectionClass but my script won’t work. (My console.log return my class name very well).
$('#menu button').each(function(){
var sectionClass = $(this).attr('class');
$(this).click(function(){
console.log (sectionClass);
$('section').hasClass(sectionClass).show();
});
});
You want to write