0

I created a function with the if statement to add a class when nav and breadcrumb text are the same. What is wrong? The

if... (this)</pre></div><!-- /wp:codemirror-blocks/code-block --> doesn't work.... Here is the code:<!-- /wp:paragraph --> <!-- wp:codemirror-blocks/code-block {"showPanel":false,"languageLabel":"no","mode":"clike","mime":"text\/x-c++src"} --> 			<div class="wp-block-codemirror-blocks-code-block code-block"><pre>vartextval = ('.breadcrumb_bread span').text();(".nav-child li a").each(function(){ 
     if ((this).is(":contains('" +textval +"')")) {
        $(this).parent().addClass('active');
    }
});
Anonymous Asked question May 13, 2021