Skip to content

Instantly share code, notes, and snippets.

View riix's full-sized avatar

Park, Soon-Ghil riix

View GitHub Profile
@inorganik
inorganik / countUp-jquery.js
Last active June 28, 2023 22:03
A CountUp extension for jQuery
// Dependency: CountUp.js: https://github.com/inorganik/CountUp.js
(function ($) {
$.fn.countup = function (params) {
// make sure dependency is present
if (typeof CountUp !== 'function') {
console.error('countUp.js is a required dependency of countUp-jquery.js.');
return;
}
@d0minicw0ng
d0minicw0ng / jquery.onvisible.js
Last active July 7, 2016 01:01
jquery.onvisible.js
/**
* function $.fn.onVisible runs callback function once the specified element is visible.
* callback: A function to execute at the time when the element is visible.
* example: $(selector).onVisible(callback);
*/
(function($) {
$.fn.onVisible = function (callback) {
var self = this;
@riix
riix / ui.mobile.js
Created April 26, 2013 07:04
ui.mobile.js
/*************************************************************************************************
* ui.mobile.js
*
* @Author : 박순길
* @Version 0.5
*
* @Searching List
* browser : Browser Detect
*
************************************************************************************************/
@riix
riix / ui.defer.js
Last active December 15, 2015 06:49
ui.defer.js
var deferCount = 0; // 중복 실행 방지
$(window).on('load', function(){
if(deferCount < 1) defer();
++deferCount;
});
function defer(){
@riix
riix / mediaquery.css
Created January 14, 2013 05:18
Mobile MediaQuery from Skeleton CSS Framework
/* All Desktop */
@media only screen and (min-width: 767px) {
21body { border: solid 10px #00ffff; }
}
/* Smaller than standard 960 (devices and browsers) */
@media only screen and (max-width: 959px) {
body { border: solid 10px #555555; }
}
@riix
riix / ui.common.js
Last active December 10, 2015 03:48
ui.common.js
/*************************************************************************************************
* ui.common.js
* @Author : 박순길
* @Version 0.6
*
************************************************************************************************/
// Console-polyfill. MIT license. Make it safe to do console.log() always.
(function(con){ var method; var dummy = function() {}; var methods = ('assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn,memory').split(','); while (method = methods.pop()) { con[method] = con[method] || dummy; } })(window.console = window.console || {});
@riix
riix / base.css
Last active December 10, 2015 00:29
base.css
@charset "utf-8";
/* =============================================================================
* Filename: base.css
* Author: riix, EPASS C&I
* Update: 2013-01-01
============================================================================= */
/* =============================================================================
Category : HTML5 Display Definitions
============================================================================= */
@riix
riix / base.css
Created December 10, 2012 08:56
base.css
@charset "utf-8";
@import url('../css/guide.css');
/* Normalize ------------------------------------------------ */
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
html, body { margin: 0px; padding: 0px; }
body, p, h1, h2, h3, h4, h5, h6, ul, ol, li, dl, dt, dd, table, th, td, form, fieldset, legend, input, textarea, button, select {-webkit-text-size-adjust: 100%; }
header, footer, section, article, aside, nav, hgroup, details, menu, figure, figcaption { display: block; }
em, address { font-style: normal; }
@riix
riix / simpleSticky.js
Created July 24, 2012 06:06
스카이스크래퍼, Sticky Menu
$(window).scroll(function() {
if ($(window).scrollTop() > 175 ) {
$('.sticky').css({'position' : 'fixed', 'top' : 0});
} else {
$('.sticky').css({'position' : 'relative', 'top' : 'none'});
}
});
@riix
riix / basic.js
Created July 24, 2012 04:50
jQuery 기본
// 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 />");