-1
A
回答
0
對於WP聯繫表7:
添加一些文件上傳字段:
<p class="hide">[file file-01]</p>
<p class="hide">[file file-02]<a class="del_file" href="#">Delete</a></p>
<p class="hide">[file file-03]<a class="del_file" href="#">Delete</a></p>
<a href="#" class="add_file">Add file </a>
接下來,添加這個腳本(您需要的JQuery)
jQuery(document).ready(function($){
//hide all inputs except the first one
$('p.hide').not(':eq(0)').hide();
//functionality for add-file link
$('a.add_file').on('click', function(e){
//show by click the first one from hidden inputs
$('p.hide:not(:visible):first').show('slow');
e.preventDefault();
});
//functionality for del-file link
$('a.del_file').on('click', function(e){
//var init
var input_parent = $(this).parent();
var input_wrap = input_parent.find('span');
//reset field value
input_wrap.html(input_wrap.html());
//hide by click
input_parent.hide('slow');
e.preventDefault();
});
});
現在你可以隱藏並顯示你的領域!
相關問題
- 1. 打開聯繫人列表以選擇聯繫人或添加新聯繫人
- 2. 將按鈕或菜單項添加到選定的聯繫人
- 3. 如何在聯繫人列表中添加按鈕或菜單?
- 4. 在Sendgrid列表中添加更多聯繫人
- 5. Android聯繫人插件或選項
- 6. 添加自定義字段到聯繫人表單7標記
- 7. 黑客「聯繫表單7」代碼添加「推薦人」字段
- 8. 在添加聯繫人後加載我的聯繫人列表
- 9. 標準添加聯繫人表單
- 10. 使用jQuery添加表單字段(wordpress中的聯繫人7表單)
- 11. 將聯繫人的事件添加到Android的聯繫人表
- 12. 聯繫表單中的多個文件附件7
- 13. 如何在聯繫人表單中添加文件附件(如pdf,doc,xml)
- 14. 在Microsoft圖表或Outlook API移動聯繫人或聯繫人文件夾
- 15. 將Aweber集成到聯繫表單或聯繫表單7(Wordpress)
- 16. 聯繫人7表單樣式問題
- 17. 添加動態場在聯繫表7
- 18. android在聯繫人應用程序中添加更多按鈕
- 19. 將工作複選框添加到聯繫人表單
- 20. 防止css在聯繫人表單上加載7
- 21. 將聯繫人添加到列表中
- 22. 在Joomla中添加聯繫人表單到模塊
- 23. 在wordpress中添加聯繫人表單ajax與短代碼
- 24. 如何將聯繫人添加到聯繫人表
- 25. 將大量聯繫人添加到iPhone聯繫人列表
- 26. 將垃圾郵件攔截到聯繫人表單中7
- 27. 我的聯繫人不添加在地址簿中的iOS 7
- 28. 聯繫人表單7的自定義重定向Wordpress
- 29. 問題添加聯繫表7
- 30. 聯繫表格7 - 添加EV