You can streamline your methods a lot by thinking about classes first
before thinking about ID's. SOme simple addition of classes to this
code will allow consolidating everything into one fairly simple function
your code:
$('#home').click(function() {
$('#who>a').removeClass('selecte
This is what I ending up going with
I seriously doubt this is the most efficient / proper way to do this
this but it's working anyways
$(document).ready(function() {
// hides the all tabs as soon as the DOM is ready
// (a little sooner than page load)
$('#homeTab').hide();
$('#whoTa
If your divs are named #workdiv , #whatdiv, etc I would try something
like:
$('#work').click(function() {
$('#workTab').toggle(400);
return false;
$("div[id!=workdiv]").hide();
$('#workdiv').show();
});
Good luck
3 matches
Mail list logo