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 ( $test2.is(':not(:animated)') ) { // fires if the element is not animated | |
$test2.animate({ | |
'width': '100%' | |
}, 3000); | |
} |
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
// Jquery make a fixed header become transparent as you scroll down | |
// and revert to not transparent when you scroll back up | |
// here is a url with more details: http://stackoverflow.com/questions/2921186/scroll-function-jquery | |
(function() { | |
var $header = $('#navbar'); | |
$(window).scroll(function () { |
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
// basically, the core of the function is do something once you reach a certain Y Offset relative to the browser window | |
$(document).ready(function () { | |
var $navPosTop = $('#navigation').position().top - 56; | |
var $flyout = $('.flyout'); | |
if (!$.browser.msie || parseInt($.browser.version) > 8) { // this checks to see if the user is using IE8 or below and doesn't run the function if they are | |
$(window).scroll(function () { | |
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
// to create a random number you do like so | |
var $aplus = Math.floor(Math.random()*356) + 4; | |
// more details on that syntax here: http://stackoverflow.com/questions/8002820/why-would-i-combine-math-floor-with-math-random | |
// here's a practical use below: | |
$('#mb_pattern div').on('hover', function() { | |
var $aplus = Math.floor(Math.random()*356) + 4; |
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
// inspired by the link effect on most interior posts from webdesigner depot like here: http://www.webdesignerdepot.com/2013/02/how-to-speed-up-your-website-load-times/ | |
// most of the heavy lifting is done in the css below: | |
.single-post p a { | |
display: inline-block; | |
overflow: hidden; | |
vertical-align: top; | |
-webkit-perspective: 600px; |
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
/* CSS transition all with ease example */ | |
.container:hover { | |
box-shadow: 0 1px 6px 4px rgba(0, 0, 0, 0.3); | |
-webkit-transition: all 800ms ease; | |
-moz-transition: all 800ms ease; | |
-o-transition: all 800ms ease; |
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
/* simple 3d box-shadow effect taken from the http://www.webdesignerdepot.com/ Twitter sidebar */ | |
.container { | |
box-shadow: #F6E128 6px 6px 0px; | |
background: #191919; | |
color: #fff; | |
} |
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
// Simple smooth-scrolling effect in Jquery | |
$('#links li').click(function(){ | |
var liIndex = $(this).index(); | |
var contentPosTop = $('.content').eq(liIndex).position().top; | |
$('html, body').stop().animate({ | |
scrollTop: contentPosTop // can add subtract numbers here for the exact position I want | |
}, 1500); | |
}); |
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
// see here for details: http://stackoverflow.com/questions/8305595/jquery-traversing-dom-to-get-to-an-element | |
// I have mark up as follows: | |
<div class="sub-category-heading" > | |
<h3 class="arrow-styling" >Samsung News</h3> | |
</div> | |
<div class="main-category-page" > | |
<div class="blogpost small-format" > | |
<div class="image" > |
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
<?php | |
// Wordpress PHP Featured Images Overview | |
// Next, I should add support for featured images | |
// http://codex.wordpress.org/Post_Thumbnails | |
// In order to use such images, I need to add a few things to the functions.php file | |
///First, I have to add | |
add_theme_support( 'post-thumbnails' ); |
OlderNewer