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
// Default variables | |
$transition-duration: .2s; | |
$transition-timing-function: ease; | |
@function transition($arguments...) { | |
$result: null; | |
@each $prop in $arguments { | |
$result: $result, $prop $transition-duration $transition-timing-function; | |
} | |
@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
;(function () { | |
// Scroll Variables (tweakable) | |
var defaultOptions = { | |
// Scrolling Core | |
frameRate : 150, // [Hz] | |
animationTime : 400, // [ms] | |
stepSize : 100, // [px] |
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
@mixin sprite-resized($sprite-image, $ratio) { | |
background-position: (nth($sprite-image, 3) * $ratio) (nth($sprite-image, 4) * $ratio); | |
background-size: (nth($sprite-image, 7) * $ratio) (nth($sprite-image, 8) * $ratio); | |
width: nth($sprite-image, 5) * $ratio; | |
height: nth($sprite-image, 6) * $ratio; | |
} | |
// Notice: background-image not specified here. Extend from common sprite class or add manually. | |
.logo { | |
@include sprite-resized($icon-logo, 0.5); |
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
<!-- http://jsfiddle.net/evMdx/ --> | |
<div class="tabs"> | |
<ul> | |
<li>Tab 1</li> | |
<li>Tab 2</li> | |
</ul> | |
<div class="tabsCont"> | |
<div class="tab">first</div> | |
<div class="tab">Second</div> |
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 embedInputs($selector) { | |
$selector.each(function() { | |
var $this = $(this); | |
$this.width(1); | |
if($this.is('textarea')) { | |
$this.css({'min-width': '', 'max-width': ''}); | |
} | |
var additionalWidth = |
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 viewportWidth() { | |
var $body = $('body'), | |
viewPortWidth = $body.css('overflow', 'hidden').width(); | |
$body.css('overflow', ''); | |
return viewPortWidth; | |
} |
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
$('.tt[title]').tooltip(200,200); |
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
// This script don't work very good. It will be very good, if you can to improve it :) | |
var page = $('body'), | |
scrollRange = 60, | |
scrollSpeed = 200; | |
$(window).mousewheel(function(event, delta, deltaX, deltaY) { | |
if (delta < 0) { | |
page.stop(true,true).animate({scrollTop: page.scrollTop()+scrollRange}, scrollSpeed); | |
} else if (delta > 0) { | |
page.stop(true,true).animate({scrollTop: page.scrollTop()-scrollRange}, scrollSpeed); |
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 debounce = (function () { | |
var timers = {}; | |
return function (callback, ms, uniqueId) { | |
if (!uniqueId) { | |
uniqueId = 'default'; | |
} | |
if (timers[uniqueId]) { | |
clearTimeout(timers[uniqueId]); | |
} | |
timers[uniqueId] = setTimeout(callback, ms); |
NewerOlder