I have the following html:
<a id="page-width" href="#" class="button">
<div class="icon sprite-application-text" ></div>
</a>
How can I make it so that when the link is clicked:
- the class changes to
<div class="icon sprite-application-sidebar-list.png" > - the object with
<section id="menu" class="grid_3"></section>has awidthof0% - the object with
<section id="content" class="grid_9"></section>changes to aclassof"grid_12"
and then when it is clicked again the class changes back to:
<div class="icon sprite-application-text" >- the object with
<section id="menu" class="grid_3"></section>has awidthof23% - the object with
<section id="content" class="grid_9"></section>changes to aclassof"grid_9"
I need some kind of toggle action but I am not sure how to implement this with jQuery?
1 Answer