Take the 2-minute tour ×

The accordition menu has some top level items, these items when clicked just expand the corresponding section of the menu. Is there a way these expansion to be triggered when URL contains some keyword? For example: When URL contains the keyword "dog" the top level "animals" auto-expand.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Ok I fixed my issue using the following:


if ((false !== strpos($url,'dog')) &&  ($li->hasClass('animals'))){

$li->attr('class', sprintf('level1 animals active'));}

Like I needed when the keyword dog exists in url the "animals" menu is set active.

share|improve this answer
add comment

Your Answer


