Hi there,
I made this small piece of code, and i think i made it in a very drawn out way. I am sure there is a lot quicker way to do it.
I want all divs to be cleared that are in a certain div. So when one link is clicked, the visable div is replaced with the new one (depending on the link)
here is the code i have done...
- $(document).ready(function(){
- $(".untitled1link").click(function(){
- $('.untitled1, .untitled2, .untitled3, .untitled4, .untitled5_1, .untitled5_2, .untitled5_3, .wall, .lightswitch, .detritus, .untitled6, .table, .socket, .socket2').hide(); $(".untitled1").fadeIn('5');
- });
- });
I just need a way to say clear all in that certain div, rather than having to name each class. I was thinking of giving each of those another class which is uniform across them all. but i dont think you can have two clases.
anyone have any ideas?
cheers
dave