0
我有一個jQuery腳本的問題。Javascript切換關閉
});
這是HTML代碼,我需要修改結構?!
<a type="button"href="search.html" class="btn btn-default main-menu"">
<img src="nav01.png" class="center-block" alt="Navigation Icon 01" />
<label class="text-center">Rechercher</label>
</a>
<a type="button" href="legratuit://#!section=18945605" class="btn btn-default main-menu">
<img src="nav02.png" class="center-block" alt="Navigation Icon 01" />
<label class="text-center">Publier</label>
</a>
<a type="button" href="legratuit://#!section=18945993" class="btn btn-default">
<img src="nav03.png" class="center-block" alt="Navigation Icon 02" />
<label class="text-center">Alertes</label>
</a>
<a type="button" href="legratuit://#!section=18724784" class="btn btn-default">
<img src="nav04.png" class="center-block" alt="Navigation Icon 03" />
<label class="text-center">Favoris</label>
</a>
<a type="button" href="legratuit://#!section=18145899" class="btn btn-default expander">
<img src="dot.png" class="center-block" alt="Navigation Icon 04" />
<label class="text-center">Autres</label>
</a>
<span id="expand" style="display: none;">
<a type="button" href="legratuit://#!section=18145899" class="btn btn-default">
<img src="nav05.png" class="center-block" alt="Navigation Icon 04" />
<label class="text-center">Compte</label>
</a>
<a type="button" href="legratuit://#!section=18145899" class="btn btn-default">
<img src="contact.png" class="center-block" alt="Navigation Icon 04" />
<label class="text-center">Contact</label>
</a>
</span>
問題是當我關閉切換如何顯示:inline-block .main-menu?
使用''if''檢查''$( 「#展開」)''接近然後改變''$(」主菜單。 「).css(」display「,」inline-block「);'' –
那麼如何驗證該#expand是否已關閉? –
也要添加你的html –