I have a rather involved piece of SSJS that determines if a particular pill in a ul class="nav nav-pills" navigator at the moment the SSJS sets viewScope.vsPillVisible to either true or false. So far so good. Now how do I get that to the pill. assume for the moment that the pill list looks like this:
<ul class="nav nav-tabs">
<li class="active"><a href="#">Home</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown” href="#">Menu 1
<spanclass="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Submenu 1-1</a></li>
<li><a href="#">Submenu 1-2</a></li>
<li><a href="#">Submenu 1-3</a></li>
</ul>
I now want to hide the dropdown tab if vsPillVisible == false I believe that I need to set an attribute but not sure that can be done in SSJS and then what attribute to set. Any help appreciated.