var currentId = $('#nav a').attr('id');
var currentClass = $('#circle-inner h1').attr('class');
if(currentClass == currentId) {
$('#nav a').addClass("current");
}
i want to compare the two valuesand if they are the same do something (addClass)
that is what i’m trying to achieve with that piece of code…
i cannot give the value of the class. there are too many.
thanks.
Does
#circle-inner h1only have one class?or if the
h1has more than one class, or to reverse the check try: