Alberta Aboriginal Treaty Lands.
View qcycle-calling-it.js
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
$('#slideshow').qCycle({ | |
toLoad: images, | |
cycleOpts: { | |
fx: 'fade', | |
timeout: 3*1000, | |
pager: '#pagers' | |
}, | |
createSlide: function (img) { | |
var data = img.data('qCycle.slideData'); | |
var slide = $('<div>').addClass('slide').append($(img).attr('alt',data.title)); |
View jquery-plugin-pattern.js
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($) { | |
$.fn.thePlugin = function(options) { | |
// build main options before element iteration: | |
var opts = $.extend({}, $.fn.thePlugin.defaults, options); | |
var $this = $(this); | |
var thePlugin = { | |
index: 0, |
View safari_search_input
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
input[type="search"] { -webkit-appearance: textfield; } |
View jquery_plugin_template.js
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($) { | |
var methods = { | |
init: function( options ) { | |
// iterate and reformat each matched element | |
return this.each(function() { | |
var $this = $(this), | |
opts = $.extend({}, $.fn.PLUGIN_NAME.defaults, options), | |
data = $this.data('PLUGIN_NAME'); |
View jquery.equalizeHeights.js
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
// stolen from http://api.jquery.com/map/ | |
// usage: $('div').equalizeHeights(); | |
$.fn.equalizeHeights = function(){ | |
return this.height( Math.max.apply( this, $(this).map(function(i,e){ return $(e).height() }).get() ) ); | |
} |
View purrrify.click.html
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
<script> | |
$(function(){ | |
// this will trigger purrrify when $('#myTrigger') is clicked: | |
$.purrrify({ | |
trigger: { selector: '#myTrigger', event: 'click' } | |
}); | |
}); | |
</script> |
View bookmarklet.js
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
// use this code as your href attribute on your 'Install this bookmarklet' anchor tag. | |
// borrowed from http://net.tutsplus.com/tutorials/javascript-ajax/create-bookmarklets-the-right-way/ | |
javascript:(function(){var jsCode = document.createElement('script');jsCode.setAttribute('src', 'http://example.com/path/to/file.js');document.body.appendChild(jsCode);}()); |
View jquery.matchWidth.js
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.matchWidth = function(){ | |
// Prepare | |
var $this = $(this); | |
// Action | |
$this.width(function(){ | |
var w = 0; | |
$(this).children().each(function(){ | |
w += $(this).outerWidth(true); | |
}); |
View handlebars-helpers.js
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
/*! ****************************** | |
Handlebars helpers | |
*******************************/ | |
// debug helper | |
// usage: {{debug}} or {{debug someValue}} | |
// from: @commondream (http://thinkvitamin.com/code/handlebars-js-part-3-tips-and-tricks/) | |
Handlebars.registerHelper("debug", function(optionalValue) { | |
console.log("Current Context"); | |
console.log("===================="); |
OlderNewer