Is there a way to implement jQuery code that will display dropdown menu options when the Trials link is clicked?
Update:
jQuery(document).ready(function () {
$("a[href='http://sheep.local/cms/trials']").click(function(e){
e.preventDefault(); // Preventing the link from opening...
$(this).next('ul').slideToggle();
});
});
HTML:
<div id="mainnavwrap">
<div id="mainnav" class="clearfix">
<ul class="menu">
<li class="first current">
<a href="http://sheep.local/cms/home">Home</a>
</li>
<li>
<a href="http://sheep.local/cms/features">Features</a>
</li>
<li>
<a href="http://sheep.local/cms/options">Options</a>
</li>
<li>
<a href="http://sheep.local/cms/pumps-motors">Pumps & Motors</a>
</li>
<li>
<a href="http://sheep.local/cms/shows">Shows</a>
</li>
<li>
<a href="http://sheep.local/cms/trials">Trials</a>
<ul>
<li class="first">
<a href="http://sheep.local/cms/trials/mathews-trial">Mathews Trial</a>
</li>
<li>
<a href="http://sheep.local/cms/trials/novatis-trial">Novatis Trial</a>
</li>
<li>
<a href="http://sheep.local/cms/trials/waimati-vet-trial">Waimati Vet Trial</a>
</li>
<li class="last">
<a href="http://sheep.local/cms/trials/uk-scab-mite-trial">UK Scab Mite Trial</a>
</li>
</ul>
</li>
<li class="last">
<a href="http://sheep.local/cms/contact">Contact</a>
</li>
</ul>
</div>
</div>
CSS:
#wrapper #contentarea #blue_box .centerblue_txt ul li ul{
width:190px;
padding:5px 0 0 10px;
display:none;
}
#wrapper #contentarea #blue_box .centerblue_txt ul li ul li{
width:185px;
padding:5px 0 5px 5px;
border-top:1px dotted #424242;
border-bottom:0px;
}
#wrapper #contentarea #blue_box .centerblue_txt ul li ul li a,
#wrapper #contentarea #blue_box .centerblue_txt ul li ul li a{
width:180px;
padding:0 0 0 10px;
font-size:12px;
background:url(../img/liBullets.gif) no-repeat left 4px;
}
#wrapper #contentarea #blue_box .centerblue_txt ul li ul li#current a,
#wrapper #contentarea #blue_box .centerblue_txt ul li ul li a:hover{
color:#D1D1D1;
background:url(../img/liBullets.gif) no-repeat left 4px;
}
#wrapper #contentarea #blue_box .centerblue_txt ul li a:hover,
#wrapper #contentarea #blue_box .centerblue_txt ul li a:active {
background:#5490f3;
}