I have a rails app https://hr4d.herokuapp.com the problem is that when I visit a new page, the page doesn't load properly, which makes my JQuery ineffective. You can visit the site, and see what I mean. Here is my JQuery:
$('document').ready(function() {
$('.dropdown-services').hide(000);
$('#caret').click(function() {
if($('.dropdown-services').is(":visible")) {
$('.dropdown-services').slideUp(300);
}
else {
$('.dropdown-services').slideDown(300);
}
});
});
Here is my navbar's code:
<div class="navbar">
<div class="box first">
<a href="/pages/home" class="link-disabled">HR4D</a>
</div>
<div class="box second">
<span class="tagline">Define, Develop, Deliver, and Differentiate</span>
<br>
<a class="link" href="/pages/home">
Home
</a>
<a class="left link" id="services" href="/pages/services">
Services
</a>
<div class="caret" id="caret"></div>
<a class="left link" href="/pages/contact">
Contact Us
</a>
<a class="left link" href="/pages/about">
About
</a>
</div>
</div>
Not sure how to fix this problem. Any help is appreciated.
Aucun commentaire:
Enregistrer un commentaire