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(){ | |
$(window).mousemove(function(event){ | |
//display the x and y axis values inside the P element | |
$('p').html('X Axis : ' + event.pageX + ' | Y Axis ' + event.pageY); | |
}); | |
}); | |
<p>Ready...</p> |
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
$(window).scroll(function() { | |
if ($(window).scrollTop() > 175 ) { | |
$('.sticky').css({'position' : 'fixed', 'top' : 0}); | |
} else { | |
$('.sticky').css({'position' : 'relative', 'top' : 'none'}); | |
} | |
}); |
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(document).ready(function() { | |
// This will fire when document is ready: | |
jQuery(window).resize(function() { | |
// This will fire each time the window is resized: | |
if(jQuery(window).width() >= 800) { | |
// if larger or equal | |
var colHeight = Math.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
// IFRAME 개체 셀렉트 sample - iframe ID | |
$('#Form_Body',window.frames["sample"].window.document); |
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 mover = false; | |
var currx = 0; | |
var curry = 0; | |
$(".calculator .title").mousedown(function(eventObject){ | |
mover = true; | |
currx = eventObject.pageX; | |
curry = eventObject.pageY; | |
}); | |
$(window).bind('mousemove', function(eventObject) { |
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
//save this code as jquery.verticalAlign.js | |
(function ($) { | |
$.fn.extend({ | |
verticalAlign: function () { | |
//Iterate over the current set of matched elements | |
return this.each(function () { |
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 imageTest(url) { | |
var imageTarget = $('#urlImageTester'); | |
imageTarget.prop('src', url); | |
var props = ['naturalHeight', 'fileCreatedDate']; | |
var tests = []; | |
var answer; | |
for (i in props) { | |
tests.push(imageTarget.prop(props[i])); | |
} | |
if ($.browser.msie) { |
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 winWidth = $(window).width(); | |
var winHeight = $(window).height(); | |
$('#log').append('<div><h1>' + winWidth + 'x' + winHeight + '@' + window.orientation + '</h1></div>'); | |
$(window).resize(function() { | |
var winWidth = $(window).width(); | |
var winHeight = $(window).height(); | |
$('#log').append('<div><h1>' + winWidth + 'x' + winHeight + '@' + window.orientation + '</h1></div>'); |
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 beforeload = (new Date()).getTime(); // calculate the time before calling the function in window.onload | |
function getPageLoadTime() { | |
var afterload = (new Date()).getTime(); // calculate the current time in afterload | |
seconds = (afterload - beforeload) / 1000; // now use the beforeload and afterload to calculate the seconds | |
console.log('Page load time : ' + seconds + ' sec(s).'); // Place the seconds in the innerHTML to show the results | |
} | |
window.onload = getPageLoadTime; |
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
<script type="text/javascript"> | |
<!-- | |
function version_compare(a,b){var c=a.split('.');var d=b.split('.');for(var i=0;i<c.length;++i){if(d.length==i){return"gt"}if(c[i]==d[i]){continue}else if(c[i]>d[i]){return"gt"}else{return"lt"}}if(c.length!=d.length){return"lt"}return"eq"} | |
var requiredJQueryVersion = '1.7'; | |
if (!window.jQuery || version_compare(window.jQuery.fn.jquery, requiredJQueryVersion) == 'lt') { | |
document.write('<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"><\/script>') | |
} | |
--> | |
</script> |