Skip to content

Instantly share code, notes, and snippets.

View riix's full-sized avatar

Park, Soon-Ghil riix

View GitHub Profile
@riix
riix / detect.QueryString.js
Created July 24, 2012 07:19
URI 쿼리 탐색, Detect URI Query String
$(document).ready(function() {
if(document.location.search == "?msg=thanks") {
$("#alert").html("Thanks for your submission!");
} else if(document.location.search == "?msg=error") {
$("#alert").html("There was an error with your submission!");
} else {
}
});
@riix
riix / resize.EqualHeight.js
Created July 24, 2012 07:36
Equal Height Columns (DIVs)
function equalHeight(group) {
tallest = 0;
group.each(function () {
thisHeight = $(this).height();
if (thisHeight > tallest) {
tallest = thisHeight;
}
});
group.height(tallest);
}
@riix
riix / ajax.수정전.html
Created July 25, 2012 09:16
Ajax Script 핸들링 정리
<!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>
<style type="text/css">
<!--
div.popup { border: solid 10px #ff0000; }
-->
</style>
@riix
riix / init.gnb.js
Created July 27, 2012 08:56
GNB init.
var gnb = $('#gnb');
var gnbList = $('#gnb > ul > li');
var snb = $('.snb');
var start = 0;
var end = 0;
timer = setInterval(function(){
$(".tt").text(start+" = "+end);
if(start == 1 && end == 1){
@riix
riix / styleSwitcher.js
Created July 30, 2012 06:13
Simple Style Switcher
$(document).ready(function(){
$('#styleSwitch .button').bind('click', function(){
$('body').removeClass();//remove all the other classes
$('#styleSwitch .button').removeClass('selected');
$(this).addClass('selected');
switch(this.id){
case 'style1':
$('body').addClass('style1');
break;
case 'style2':
@riix
riix / caption.js
Created July 30, 2012 08:45
Add Badge Caption
$("img.captionme").each(function(i)
{
var captiontext = $(this).attr('title');
$(this).wrap("<div class='imgpost'></div>");
$(this).parent().append("<div class='thecaption'>" + captiontext + "</div>");
});
@riix
riix / countCharacter.js
Created August 2, 2012 03:52
Count Character
$(".countchars").each(function () {
var length = $(this).val().length;
$(this).parent().find('#charlength').html('<b>' + length + '</b>');
$(this).keyup(function () {
var new_length = $(this).val().length;
$(this).parent().find('#charlength').html('<b>' + new_length + '</b>');
if (new_length == "140") {
$('#charlength').css('background', 'red');
$('#charlength').css('color', '#000000');
}
@riix
riix / dabblet.css
Created November 30, 2012 07:08
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@riix
riix / dabblet.css
Created November 30, 2012 07:09
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@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; }