私は次のhtmlを持っています:
<a id="page-width" href="#" class="button">
<div class="icon sprite-application-text" ></div>
</a>
リンクがクリックされたときに次のようにするにはどうすればよいですか。
- クラスはに変わります
<div class="icon sprite-application-sidebar-list.png" > - のオブジェクトに
<section id="menu" class="grid_3"></section>はwidth0% - に
<section id="content" class="grid_9"></section>変更されたオブジェクトclass"grid_12"
そして、もう一度クリックすると、クラスは次のように戻ります。
<div class="icon sprite-application-text" >- のオブジェクトに
<section id="menu" class="grid_3"></section>はwidth23% - に
<section id="content" class="grid_9"></section>変更されたオブジェクトclass"grid_9"
ある種のトグルアクションが必要ですが、jQueryでこれを実装する方法がわかりませんか?