切換我想點擊一個按鈕(或在我的例子下面鏈接)和內容的2塊之間的切換基本上從顯示的內容編輯內容去。如何在jQuery的
我有下面的代碼snipits:
<style type="text/css">
div.show {display:block;}
input.hide {display:none;}
</style>
<a href="#">edit</a> <!--not sure what my jquery should look like to do toggling-->
<div class="show" id="d-01-on">Some content</div>
<input class="hide" id="d-01-off" name="d-01" value="Some content" />
感謝您的幫助。
[見How to Streamline and Compress Repetitive jQuery Code,用於擴展到這個己技巧]
優秀@Skatox。完美的作品。謝謝! –
如果你有一個@Skatox你能看看我的後續問題在http://stackoverflow.com/questions/13159735/how-to-toggle-within-a-content-list-in-jquery?謝謝。 –
我很高興它的工作,會檢查一會兒。 – Skatox