View addGroupSnippit.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
if ($('.groupSelectInputs').length > 0 ){ | |
// declares the group string | |
var groupsString = ""; | |
// Loops through all of the select inputs | |
$.each($('.groupSelectInputs'), function(i){ | |
groupsString = groupsString == "" ? this.value : groupsString +','+ this.value; | |
}); | |
View forminputsnippit.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
<fm:If value="{$$get.groupId}"><input type="hidden" name="groupId" id="groupId" value="{$$get.groupId}" /></fm:If> |
View checkIfHTTP
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
var str="http://someurl.ca/"; | |
str = str.search("http://") == -1 ? "http://" + str : str; | |
document.write(str); |
View underscore-template-conditional.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
// If URL is available URL link the image | |
// Otherwise just display the image | |
<% if ( instagram_link_url ) { %> <a href="<%= instagram_link_url %>" target="_blank"> <% } %> | |
<img src="<%= url %>" alt="<%= username %>" /> | |
<% if ( instagram_link_url ) { %> </a> <% } %> | |
// Example 2 - Check if formated date | |
<% if (typeof(date) != "undefined") { %> | |
<span class="date"><%= date %></span> | |
<% } %> |
View AnimationBounce.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
// Requires jQuery & jQuery UI | |
$('<ELEMENT>').animate({ | |
bottom: <VAR CalculatedPercentage>+'%', | |
duration: <VAR duration> | |
},function(){ | |
$(this).effect("bounce", { direction:'down', times:4 }, 600); | |
}); |
View trackVideoPlays.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
Highwire.prototype._trackVideoPlays = function(){ | |
// Gets reference to the Vimeo video player | |
var f = $('#VimeoPlayer'), | |
url = f.attr('src').split('?')[0]; | |
// Listen for messages from the player | |
if (window.addEventListener){ | |
window.addEventListener('message', onMessageReceived, false); | |
} else { |
View YouTubeEventHandling.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
var tag = document.createElement('script'); | |
tag.src = "//www.youtube.com/iframe_api"; | |
var firstScriptTag = document.getElementsByTagName('script')[0]; | |
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); | |
var player; | |
function onYouTubeIframeAPIReady() { | |
player = new YT.Player('player', { | |
height: '254', | |
width: '451', |
View FacebookPageTabResizeiFrame.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
<!DOCTYPE html> | |
<html lang="en" style="overflow: hidden"> | |
<body style="overflow:hidden"> | |
<head> | |
<!-- You need to include jquery & FBSDK--> | |
</head> | |
<body> | |
<div id="fb-root"></div> | |
<script> | |
window.fbAsyncInit = function() { |
View drawdrip.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
<!doctype html> | |
<html> | |
<head> | |
<script type="text/javascript" src="processing.js"></script> | |
</head> | |
<body> | |
<div class="learning-demo"> | |
<script type="application/processing"> |
View Tests.FBResize.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
window.onload = function() { | |
FB.Canvas.setSize({ height: $(window).outerHeight() }); | |
} | |
window.onload = function() { | |
setTimeout(function(){ | |
FB.Canvas.setAutoGrow(); | |
},1000); | |
} |
OlderNewer