다운로드 : // jQuery Right-Click Plugin // // Version 1.01 // // Cory S.N. LaViska // A Beautiful Site (http://abeautifulsite.net/) // 20 December 2008 // // Visit http://abeautifulsite.net/notebook/68 for more information // // Usage: // //// Capture right click //$("#selector").rightClick( function(e) { //// Do something //}); // //// Capture right mouse down //$("#selector").rightMouseDown( funct..
즐겨찾기에 다음을 추가 MRI : javascript:function loadScript(scriptURL) { var scriptElem = document.createElement('SCRIPT'); scriptElem.setAttribute('language', 'JavaScript'); scriptElem.setAttribute('src', scriptURL); document.body.appendChild(scriptElem);}loadScript('http://westciv.com/mri/theMRI.js'); XRAY : javascript:function loadScript(scriptURL) { var scriptElem = document.createElement('SCRIPT'); s..
선택된 요소에 jQuery 메서드를 한꺼번에 연결해서 적용되게 한다. 체인 적용전 $("#id").val("Click me"); $("#id").addClass("cssclass"); $("#id").css({"width":"300px"}); $("#id").click(function(e){ alert('hello'); }) 체인 적용후 (들여쓰기와 줄바꿈을 이용할 수 있다.) $("#id").val("Click me").addClass("cssclass").css({"width":"300px"}) .click(function(e){ alert('hello'); })
var mobileKeyWords = new Array('iPhone', 'iPod', 'BlackBerry', 'Android', 'Windows CE', 'LG', 'MOT', 'SAMSUNG', 'SonyEricsson'); for (var word in mobileKeyWords){ if (navigator.userAgent.match(mobileKeyWords[word]) != null){ location.href = "http://m.domain.com"; break; } }
jQuery(document).ready(function(){ $(document).mousemove(function(e){ arr_mousexy["x"] = e.pageX; arr_mousexy["y"] = e.pageY; }); });
@http://www.juniac.net/176 function typeoftostr(o) { return Object.prototype.toString.call(o); } document.write(typeoftostr("dfdf")); document.write(typeoftostr([])); document.write(typeoftostr({})); document.write(typeoftostr(1)); document.write(typeoftostr(true)); 출력 : [object String][object Array][object Object][object Number][object Boolean]