Okay so I have a bunch of tables in my website they all have the same class which is 'item -' and what ever number the table is here is how I did that:
$("table").each(function(index){
$(this).addClass('item-'+index);
});
Now what im trying to do is make it so if the class is anything higher than 'item-8' to make the visibility hidden i tried something like this but it doesn't work. am I in the right track or completely off?
$('table').each(function(index){
if($(this).hasClass('item-'index) > 8){
$(this).css('visibility','hidden');
}
});