My HTML code is
<div class="nav-collapse collapse">
<ul class="nav nav-pills ddmenu">
<li class="dropdown "><a href="index.html">Home</a></li>
<li class="dropdown"><a href="about.html">About</a></li>
<li class="dropdown active"><a href="features.html">Features</a>
<ul class="dropdown-menu">
<li><a href="#" id="drp_pbx">Office</a></li>
<li><a href="#" id="drp_call">Center</a></li>
</ul>
</li>
<li class="dropdown"><a href="apis.html">API</a></li>
<li class="dropdown"><a href="downloads.html">Download</a></li>
<li class="dropdown"><a href="blogs.php">Blog</a></li>
<li class="dropdown"><a href="contact.php">Contact</a></li>
</ul>
</div>
I got to drop downs menu under 'features.html' and i wrote jquery to display 'drp_pbx' and 'drp_call' drop content depend on click event,My jquery is
$(document).ready(function () {
$("#callcenter_features").hide();
$('#drp_pbx, #drp_call').click(function () {
if (this.id == 'drp_pbx') {
$("#pbx_features").show();
}
else if (this.id == 'drp_call') {
$("#pbx_features").hide();
$("#callcenter_features").show();
}
});
});
If i am at features.html table every thing works as expected,if i tried from some other pages to access 'drp_pbx' and 'drp_call' functionalities not working properly,even if i clicked 'drp_call' it always appear content of drp_pbx.
I want to display content according to my click event of jquery. Please help to find a solution..
Thank you.
