View svg.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
/* | |
* Replace all SVG images with inline SVG | |
*/ | |
//if img has svg, change it! | |
jQuery('img').filter(function() { | |
return this.src.match(/.*\.svg$/); | |
}).each(function(){ | |
var $img = jQuery(this); | |
var imgID = $img.attr('id'); |
View tmpClass.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
$(document).ready(function () { | |
$.fn.extend({ | |
tmpClass: function (className, duration) { | |
var elements = this; | |
setTimeout(function () { | |
elements.removeClass(className); | |
}, duration); | |
return this.each(function () { |
View Position-in-Middle.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
//It will work for the element that has position: relative | |
function postionMiddle(e) { | |
var capHeightHalf = $(e).innerHeight() / 2, | |
capParentHeightHalf = $(e).parent().innerHeight() / 2, | |
capPosition = capParentHeightHalf - capHeightHalf; | |
$(e).css("top", capPosition ); | |
} | |
postionMiddle(".caption"); // place your element instead .caption |
View tab.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
/*Note: add class "tabSet1" or "tabSet2" after ul.tabs and tab-content */ | |
function tab(x) { | |
var a = $('ul.tabs.' + x + ' ' + 'li'); | |
a.click(function () { | |
var tab_id = $(this).attr('data-tab'); | |
a.removeClass('active'); | |
$('.tab-content.' + x).removeClass('active'); | |
$(this).addClass('active'); |
View .gitignore
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
View australian-postcodes.csv
We can't make this file beautiful and searchable because it's too large.
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
Postcode, Suburb, State, Lat, Lan | |
200, Australian National University, ACT, -35.280, 149.120 | |
221, Barton, ACT, -35.200, 149.100 | |
800, Darwin, NT, -12.800, 130.960 | |
801, Darwin, NT, -12.800, 130.960 | |
804, Parap, NT, -12.430, 130.840 | |
810, Alawa, NT, -12.380, 130.880 | |
810, Brinkin, NT, -12.380, 130.880 | |
810, Casuarina, NT, -12.380, 130.880 | |
810, Coconut Grove, NT, -12.380, 130.880 |
View abnvalidate.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 abnValidate(value, element){ | |
if (value.length != 11 || isNaN(parseInt(value))) | |
return false; | |
var weighting =[10,1,3,5,7,9,11,13,15,17,19]; | |
var tally = (parseInt(value[0]) - 1) * weighting[0]; | |
for (var i = 1; i < value.length; i++){ | |
tally += (parseInt(value[i]) * weighting[i]); | |
} | |
return (tally % 89) == 0; | |
} |
View CSS3 Media Queries Template
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
/* | |
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/ | |
*/ | |
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} |
View readme.txt
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
//HTML | |
/*===================== | |
<div class="root"> | |
<div class="imageplayer"> | |
</div> | |
</div> | |
=======================*/ | |
OlderNewer