Skip to content

Instantly share code, notes, and snippets.

@kmallea
kmallea / jquery votigo plugin
Created August 9, 2012 14:05
Getting all contests
$('.contestsBtn').click(function(){
$('body').wm_votigo.getAllContests(function(d){
// these are the contests results. Do something.
// lets loop through all the contests in the results
$('.contestResults').empty().append('<h3>Get All Contests Results</h3>');
$(d.Contests).each(function(){
console.log(this)
$('.contestResults').append('Contest Name: ' + this.Contest.contestName + ' | Contest ID: ' + this.Contest.contestId + '<br />');
});
@kmallea
kmallea / index.html
Created June 14, 2013 19:20
Mobile detection
<div class=""></div>
// tries to execute the uri:scheme
function uriSchemeWithHyperlinkFallback(uri, href) {
if(!window.open(uri)){
window.location = href;
}
}