krot

jquery открытие закрытие элем

Nov 6th, 2015
94
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //onclick="return open1EL('hidden11');">
  2.  
  3. //<div id="hidden11" style="display: none;">
  4. function open1EL (id) {
  5. if($('#'+id).css('display')=='none')
  6. $('#'+id).show();
  7. else
  8. $('#'+id).hide();
  9. };
  10.  
  11. //js
  12. function openEL (id) {
  13. var el=document.getElementById(id);
  14. if(el.style.display=='none')el.style.display="block";
  15. else el.style.display="none";
  16. }
RAW Paste Data