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
// Straightforward + simple. | |
$("button").on("click", function(event) { | |
event.preventDefault(); | |
var button = $(this); | |
var numberElem = button.find(".number"); | |
var number = Number(numberElem.text()) - 1; | |
numberElem.text(number); | |
if (number === 0) { | |
button.prop("disabled", true); | |
button.off("click"); |
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
<header> | |
<a href="http://blog.sarasoueidan.com/horizontal-portfolio-layout">Read Tutorial</a> | |
</header> | |
<div class="demo-wrapper"> | |
<h1>Horizontal Portfolio Layout With CSS3 Animations and jQuery</h1> | |
<ul class="portfolio-items"> | |
<li class="item"> |
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
$.fn.animateText = function(delay, klass) { | |
var text = this.text(); | |
var letters = text.split(''); | |
return this.each(function(){ | |
var $this = $(this); | |
$this.html(text.replace(/./g, '<span class="letter">$&</span>')); | |
$this.find('span.letter').each(function(i, el){ | |
setTimeout(function(){ $(el).addClass(klass); }, delay * i); |
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
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<meta name="description" content=""> |
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
<p class="accent"> | |
<!--[if IE]> | |
According to the conditional comment this is IE<br /> | |
<![endif]--> | |
<!--[if IE 6]> | |
According to the conditional comment this is IE 6<br /> | |
<![endif]--> | |
<!--[if IE 7]> | |
According to the conditional comment this is IE 7<br /> | |
<![endif]--> |
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
$.getJSON("http://twitter.com/statuses/user_timeline/username.json?callback=?", function(data) { | |
$("#twitter").html(data[0].text); | |
}); | |
//put this anywhere and wrap it in a div called #twitter or anything |
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://css-tricks.com/examples/SoundOnHover/ | |
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
$(document).ready(function(){ | |
//Check to see if the window is top if not then display button | |
$(window).scroll(function(){ | |
if ($(this).scrollTop() > 100) { | |
$('.scrollToTop').fadeIn(); | |
} else { | |
$('.scrollToTop').fadeOut(); | |
} | |
}); | |
//Click event to scroll to top |
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() { | |
$('ul.nav a').bind('click',function(event){ | |
var $anchor = $(this); | |
$('html, body').stop().animate({ | |
scrollTop: $($anchor.attr('href')).offset().top | |
}, 1500,'easeInOutExpo'); | |
event.preventDefault(); | |
}); | |
}); |
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
h2{ | |
-webkit-transform: rotate(-90deg); | |
-moz-transform: rotate(-90deg); | |
-o-transform: rotate(-90deg); | |
writing-mode: tb-rl; | |
filter: flipV flipH; | |
position:absolute; left:-100px; | |
} |