This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Defer Function Snipplet | |
* by Riix | |
*/ | |
// http://ajaxian.com/archives/no-more-ie6-background-flicker | |
if (typeof document.body.style.maxHeight == "undefined") { | |
try { | |
document.execCommand('BackgroundImageCache', false, true); | |
} catch(e) { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 시작페이지 설정 | |
$('#util a[href="#bookmark"]').on('click', function(event){ | |
event.preventDefault(); | |
if($.browser.msie){ | |
window.external.AddFavorite('http://www.epasshakjum.co.kr', '이패스학점 - 평생교육의 실현'); | |
} else { | |
alert('죄송합니다.\nInternet Explorer 만 지원하는 스크립트입니다.\n브라우저 내장 기능을 사용해주세요.\nFireFox 의 경우 Ctrl+D의 단축키를 제공합니다.'); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var object = { | |
a: 10; | |
b: 20; | |
s: 'hello' | |
}; | |
$.each(object, function(name, value){ | |
console.log(name+':'+value); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('body').bind('keypress', function(event) { | |
if( event.keyCode == 13 ){ | |
$('form').eq(0).submit(); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- HTML --> | |
<input id="password-clear" type="text" value="Password" autocomplete="off" /> | |
<input id="password-password" type="password" name="password" value="" autocomplete="off" /> | |
// CSS | |
#password-clear { | |
display: none; | |
} | |
// JQUERY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Switch StyleSheets With jQuery | |
$('link[media='screen']').attr('href', 'Alternative.css'); | |
// 동적 생성으로 DOM 객체 추가하기 | |
var $newDiv = $('<div></div>'); | |
$newDiv.attr("id","newDiv").appendTo("body"); | |
// 양 객체 사이에 다른 요소 삽입하기 | |
$("p:not(:last-of-type)").after("<br />"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $ap = navigator.appVersion | |
var $ua = navigator.userAgent.toLowerCase (); | |
var browser = { | |
ie : $ap.indexOf('MSIE') != -1, | |
ie6 : $ap.indexOf('MSIE 6') != -1, | |
ie7 : $ap.indexOf('MSIE 7') != -1, | |
ie8 : $ap.indexOf('MSIE 8') != -1, | |
opera : !!window.opera, | |
safari : $ua.indexOf('safari') != -1, | |
safari3 : $ua.indexOf('applewebkit/5') != -1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>Document</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" charset="utf-8"></script> | |
<script type="text/javascript"> | |
<!-- // | |
$(function(){ | |
$('input[type="submit"]:eq(0)').on('click', function(event){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$.fn.strCut = function(settings) { | |
var config = { | |
max : 10 | |
}; | |
if (settings) $.extend(config, settings); | |
this.each(function() { | |
$(this).css('white-space','nowrap'); | |
if ($(this).text().length > config.max) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.fn.center = function () { | |
this.css("position","absolute"); | |
this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px"); | |
this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px"); | |
return this; | |
} | |
$(element).center(); |
OlderNewer