Skip to content

Instantly share code, notes, and snippets.

@rolka
rolka / gist:5542013
Created May 8, 2013 17:21
jQuery: CSS hover
jQuery(function($) {
$('.ai-header-primary-navigation-wrapper .container .row .span12 .pull-right .inline li:last-child').hover(function() {
$(this).css('background', '#eef1f3')
},function() {
$(this).css('color', '#fff')
}
);
});
@rolka
rolka / gist:5584477
Created May 15, 2013 14:40
jQUERY: resize
$(window).resize(function() {
//update stuff
});
@rolka
rolka / gist:5636311
Created May 23, 2013 14:07
CSS: box sizing
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
@rolka
rolka / gist:5736287
Created June 8, 2013 19:19
CSS: Normalize
<link rel="stylesheet" href="http://necolas.github.io/normalize.css/2.1.2/normalize.css">
@rolka
rolka / gist:5858870
Created June 25, 2013 14:26
WP: ignore php warnings
error_reporting(0);
@ini_set('display_errors', 0);
@rolka
rolka / gist:5984943
Created July 12, 2013 14:36
JS Methods
var object = "String cat object";
var length = object.length;
alert(length);
var index = object.indexOf("t");
var index2 = object.indexOf("t", index + 1);
alert ("First t " + index);
@rolka
rolka / gist:6080763
Created July 25, 2013 15:18
wp: style.css
/*
Theme Name: Rose
Theme URI: the-theme's-homepage
Description: a-brief-description
Author: your-name
Author URI: your-URI
Template: use-this-to-define-a-parent-theme--optional
Version: a-number--optional
Tags: a-comma-delimited-list--optional
.
@rolka
rolka / gist:6088282
Created July 26, 2013 11:49
HTML5 shiv
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
@rolka
rolka / gist:6095077
Created July 27, 2013 14:56
PHP: short echo
<?=$a?>
@rolka
rolka / gist:6185936
Created August 8, 2013 16:03
wp: get_template_directory_uri();
<?php echo get_template_directory_uri(); ?>