This file contains 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, undefined){ | |
$.fn.myPlugin = function(opts) { | |
var defaults = { | |
// setting your default values for options | |
} | |
// extend the options from defaults with user's options | |
var options = $.extend(defaults, opts || {}); | |
return this.each(function(){ // jQuery chainability |
This file contains 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
if( document.createTouch ) { | |
this.addEvent(c[j],'tap',this.tipOver,false); | |
} else { | |
this.addEvent(c[j],'mouseover',this.tipOver,false); | |
this.addEvent(c[j],'mouseout',this.tipOut,false); | |
} |
This file contains 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
li:nth-child(3n-7) { | |
margin: 0 5%; | |
/*select every 2nd child in a row of three*/ | |
} |
This file contains 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 roundNumber(num, dec) { | |
var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec); | |
return result; | |
} |
This file contains 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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
html { | |
background: #fff; | |
min-height: 100%; | |
} | |
input,label,textarea { | |
outline: none; |
This file contains 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
/** | |
* Nice Button | |
*/ | |
button { | |
border: 1px solid #000; | |
margin: 0; | |
outline: 0; | |
padding: 10px 30px; | |
color: rgba(255,255,255,0.9); |
This file contains 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 img = new Image(); | |
img.src = 'url-to-my-image.jpg'; | |
img.onload = function() { | |
document.body.appendChild( img ); | |
} |
This file contains 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
/** | |
* stars | |
*/ | |
html,body { | |
background: #222; | |
margin: 2em; | |
} | |
ul { | |
margin: 0; |
This file contains 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
/** | |
* faded buttons | |
*/ | |
body { | |
background: #555; | |
font-family: Arial; | |
color: white; | |
font-size: 30px; | |
text-shadow: 0 1px 0 rgba(0,0,0,0.6); | |
} |
This file contains 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
/** | |
* faded buttons | |
*/ | |
body { | |
background: #555; | |
font-family: Arial; | |
color: white; | |
font-size: 30px; | |
text-shadow: 0 1px 0 rgba(0,0,0,0.6); | |
} |