I have animated nav buttons and can actually set everything with css with the exception of one element. An arrow. Here's the actual live page.
http://sclarkstudio.com/testing/mm/index.htm
I'm trying to make the arrow visible and static on the current page. I have a hover script that animates the arrow when the class is set to .arrow and it's static and visible when the class is set to .currenta.
<body id="@@id@@"> <!-- in this case "home" -->
<nav class="sidebar1">
<ul class="navbox">
<li class="navBtn">
<div class="slider on"></div>
<a id="BtnText" class="navButton home"href="index.htm">Home</a>
<div id="arrow" class="arrow"></div>
</li>
<li class="navBtn">
<div class="slider on"></div>
<a id="BtnText" class="navButton news"href="news.htm">News</a>
<div id="arrow" class="arrow"></div>
and so on...
</ul>
</nav>
The script that I'm trying to write just needs to change the class of the arrow div to ".currenta"
var bodyID = $("body").attr("id");
var url = window.location;
$(function() {
$('nav ul li a #BtnText').each(function(){
var myHref = $(this).attr('href');
if( url == myHref) {
$(this).closest('div','#arrow').css('currenta');
}
});
});
I have been pulling my hair out trying to figure this one out and not the best coder.