This file contains hidden or 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 a=function(c){var b=this;b.obj=c;b.showData=b.obj.attr("data-showOn");if(b.showData!==undefined){b.init()}else{return}};a.prototype.init=function(){var c=this,b=store.getAll();c.showOn=c.showData.split(" ");c.expLength=c.showOn.length;c.currExp=$.map(b,function(d,f){return d});c.loop()};a.prototype.loop=function(){var d=this;d.count=0;for(var c=0;c<d.expLength;c++){for(var b=0;b<d.currExp.length;b++){if(d.showOn[c]===d.currExp[b]){d.count++;break}}if(c+1===d.expLength){d.validate()}}};a.prototype.validate=function(){var b=this;b.obj.show()};$.fn.setExperince=function(){return this.each(function(){var b=new a($(this))})}})(); | |
(function() { | |
var UDexp = function(obj) { | |
var sf = this; | |
sf.obj = obj; | |
sf.showData = sf.obj.attr('data-showOn'); | |
if (sf.showData !== undefined) { | |
sf.init(); | |
} else { |
This file contains hidden or 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
// Fruit.js | |
define(['jquery'], function($) { | |
'use strict'; | |
var Fruit = Object.makeSubclass(); | |
Fruit.prototype._init = function() { | |
}; |
This file contains hidden or 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
// Wrap the plugin definition in a callback bubble so we can bind | |
// it to the dollar sign. | |
(function( $ ){ | |
// This jQuery plugin creates proxied event handlers that | |
// consult with an additional conditional callback to see if | |
// the original event handler should be executed. | |
$.fn.bindIf = function( | |
eventType, | |
eventHandler, |
This file contains hidden or 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
// jQuery.support.transition | |
// to verify that CSS3 transition is supported (or any of its browser-specific implementations) | |
$.support.transition = (function(){ | |
var thisBody = document.body || document.documentElement, | |
thisStyle = thisBody.style, | |
support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined; | |
return support; | |
})(); |
This file contains hidden or 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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
// jQuery.support.css3 | |
// verifies css3 properties across browsers | |
// i.e. $.support.css3('transition') | |
$.support.css3 = function(prop) { | |
var | |
support = false, | |
thisBody = document.body || document.documentElement, | |
thisStyle = thisBody.style, | |
uc_prop = prop.charAt(0).toUpperCase() + prop.substr(1), | |
props = [ |
This file contains hidden or 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 has3d(){ | |
var el = $('<p>')[0], $iframe = $('<iframe>'), has3d, t, | |
transforms = { | |
'webkitTransform': '-webkit-transform', | |
'OTransform': '-o-transform', | |
'msTransform': '-ms-transform', | |
'transform': 'transform' | |
}; | |
// Add it to the body to get the computed style |
This file contains hidden or 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 has3d(){ | |
var el = document.createElement('p'), | |
has3d, | |
transforms = { | |
'webkitTransform':'-webkit-transform', | |
'OTransform':'-o-transform', | |
'msTransform':'-ms-transform', | |
'MozTransform':'-moz-transform', | |
'transform':'transform' | |
}; |
This file contains hidden or 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 sliding = false; // variable outside function scope to detect a slide is in progress | |
function slideTo(target, duration){ // credit to Mahieddine Abdelkader & Ludwig Wendzich for original ideas. | |
var to = isNaN(target) ? $(target).offset().top : target, //find scroll to position | |
from = $(window).scrollTop() //find starting point | |
dy = to-from, //calculate change in scroll position - deltaY | |
body = $("body"), // TODO: better to have it outside of local scope already rather than fetching it every time... | |
duration = isNaN(duration) ? 500 : duration; | |
// We're going to use translate-y to move the the page so it feels like we're at the *from* scroll position, when we're actually instantly at the *to* scroll position. */ |
This file contains hidden or 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
{ | |
"files": | |
{ | |
"jquery" : "http://code.jquery.com/jquery.js", | |
"jquery.min" : "http://code.jquery.com/jquery.min.js", | |
"jquery-cookie" : "https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js", | |
"jquery-dotimeout" : "https://raw.github.com/cowboy/jquery-dotimeout/master/jquery.ba-dotimeout.min.js", | |
"jquery-extra-selectors" : "https://raw.github.com/keithclark/JQuery-Extended-Selectors/master/jquery-extra-selectors.js", | |
"jquery-flexslider" : "https://raw.github.com/mbmufffin/FlexSlider/master/jquery.flexslider-min.js", | |
"jquery-mediaelement" : "https://raw.github.com/johndyer/mediaelement/master/build/mediaelement-and-player.js", |