onclick="[change all elements with the current class of "x" to a class of "y"]
Hi,
Basically, what I am trying to do is this:
Code:
<p class="nav_p"><img src="<? nav('Home'); ?>" alt="" /></p>
<p class="nav_p"><img src="<? nav('e-Portfolio'); ?>" alt="" /></p>
<p class="nav_p"><img src="<? nav('Blog'); ?>" alt="" /></p>
<p class="nav_p"><img src="<? nav('About Me'); ?>" alt="" /></p>
<p class="nav_p"><img src="<? nav('Links'); ?>" alt="" /></p>
<br />
<p class="nav_p_small"><img src="<? nav_small('Big'); ?>" alt="" /></p>
<p class="nav_p_small"><a href="#" onclick="[change all elements with the current class of "nav_p" to a class of "nav_p_small"]><img src="<? nav_small('Small'); ?>" alt="" border="0" /></a></p>
onclick="[change all elements with the current class of "nav_p" to a class of "nav_p_small"]
How can I do this? Any help would be very much appreciated.
Oliver
Changing the <p> for a <div>
Well, that works for <p> but what if i want to change the class of a DIV? I tried to do it by myself but i'm not familiar with javascript, so.. can u guys give me a light?