OK, new one. I have a set of divs with the class 'utilbox'. I have a list with the class 'utillink' and each list item has an id of u1, u2, etc.. When I click on an item in the list, I want to hide all of the utilbox elements and show the new one that I need. I also want to apply a class to my utillink list item.
Help!
var showutilbox = function(i) {
$("div.utilbox").hide();
$("#util"+i).show();
}
var addgoclassutil = function(){
$("div.utillink").removeClass("goclass");
$(this).addClass("goclass");
}
$("#u1").click(addgoclassutil);
$("#u1").click(showutilbox(1));
$("#u2").click(addgoclassutil);
$("#u2").click(showutilbox(2));
That isn't working.