Is this a CSS or jQuery problem?
This shouldn't be a problem with the jQuery but the CSS, but i just can't see what im doing wrong.
Have adapted a jQuery tabbed menu system for my own site, here's a snippet:
-
$(document).ready(function(){
$("#nav > li").click(function(e){
switch(e.target.id){
case "html":
//change status & style menu
$("#html").addClass("active");
$("#css").removeClass("active");
$("#js").removeClass("active");
$("#php").removeClass("active");
//display selected division, hide others
$("div.html").slideDown();
$("div.css").css("display", "none");
$("div.js").css("display", "none");
$("div.php").css("display", "none");
break;
so it adds the 'active' class to the tab that is clicked. it's not hosted yet so i can't give you a link.
the css for active is just
-
.active
{
background : #6699ff;
}
when i have anchors between the <li>'s and style the anchors instead, it works (well i can set 'color') but not when i take them out (i dont need them).
so because it's styling links i am assuming it is a css problem rather than a jquery.
any help appreciated
thanks[/code]