Question

I've got an issue with this javascript that I use to highlight active items in a navigation tab. Everything's working fine here http://jsfiddle.net/gfkM4/148/ but in blogger it is not:

I added the class

.active_item {
    background:#EFEFEF;
}

to my template and put this script in front of the closing header tag

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type='text/javascript'>

/* Function to add class active_item to navsub */

(function () {
    $('.navsub li').bind('click', function (e) {
        var el = $(this),
            list = $('.navsub').find('li');
        list.removeClass('active_item');
        el.addClass('active_item');
    });
}());

</script>

</head>

However, the class is not added as expected on blogger... Any hints are greatly appreciated!

Was it helpful?

Solution

..The problem was resolved without the use of javascript - see the comments.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top