I m using jQuery for my drupal site. I can't add class to current element by using jQuery.
I put this addclass inside a if condition with alert. Alert has working fine. But addclass not working.
if (jQuery(".explore_degree_widget_area li a").has(":contains('Associates')")) {
jQuery(this).addClass('icon_associate');
alert('Yes');
}
Can you help me?
$(this)inside.each()iteration and callback functions in methods like.text(),.html()etc.