클로저
See the Pen EaXBQz by coens (@coens) on CodePen.
dev/javascipt
2015. 1. 27. 15:58
jquery 객체 비교하기 (jQuery.equals How To Compare DOM Elements)
http://groups.google.com/group/jquery-en/browse_thread/thread/1860c35706b93ecb $(a)==$(b) --> 이러면 안댐… –_-; $(a).get(0) == $(b).get(0) --> 이렇게 해야됨 (function($){ jQuery.fn.equals = function(selector) { return $(this).get(0)==$(selector).get(0); }; })(jQuery); Implementation Example: ... ... $('#id0').equals('#id1') //false $('div').equals('#id0') //true $('div:eq(1)').equals('#id1') //true $('#id0..
dev/javascipt
2011. 2. 7. 16:47
비트이동 예제...
var su=false; document.write(!su+" "); su=1; document.write(~su+" "); // 000 0001 => 1111 1110=>-2 su=10; document.write(++su+" "); document.write(--su+" "); a_1=10; b_1=++a_1; document.write("a_1="+a_1+", b_1="+b_1+" "); a_2=10; b_2=a_2++; document.write("a_2="+a_2+", b_2="+b_2+" ");
dev/javascipt
2008. 9. 5. 11:37
공지사항