jquery레디1 [jQuery] jquery ready 좀 깔끔하게 쓰자. @ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 $(window).on('load', function(){ title_copy('타이틀); }); $(document).ready(function(){ $(document) .on('click','.클래스명', function (e) { var linkTarget = $(this).closest('.클래스명'); if (linkTarget.hasClass('on')==true) { $('.클래스명').removeClass('on'); } else { $('.클래스명').removeClass('on'); $(this).closest('.클래스명').addClass('on'); } return false; }.. 2022. 7. 25. 이전 1 다음