code
stringlengths
1
2.08M
language
stringclasses
1 value
// test for ternary result = (true?3:4)==3 && (false?5:6)==6;
JavaScript
var Foo = { value : function() { return this.x + this.y; } }; var a = { prototype: Foo, x: 1, y: 2 }; var b = new Foo(); b.x = 2; b.y = 3; var result1 = a.value(); var result2 = b.value(); result = result1==3 && result2==5;
JavaScript
// the 'lf' in the printf caused issues writing doubles on some compilers var a=5.0/10.0*100.0; var b=5.0*110.0; var c=50.0/10.0; a.dump(); b.dump(); c.dump(); result = a==50 && b==550 && c==5;
JavaScript
// Undefined/null from http://en.wikipedia.org/wiki/JavaScript_syntax var testUndefined; // variable declared but not defined, set to value of undefined var testObj = {}; result = 1; if ((""+testUndefined) != "undefined") result = 0; // test variable exists but value not defined, displays undefined if ((""+te...
JavaScript
// test for postincrement working as expected var foo = 5; result = (foo++)==5;
JavaScript
// simply testing we can return the correct value result = 1;
JavaScript
// functions in variables using JSON-style initialisation var bob = { add : function(x,y) { return x+y; } }; result = bob.add(3,6)==9;
JavaScript
// simple function scoping test var a = 7; function add(x,y) { var a=x+y; return a; } result = add(3,6)==9 && a==7;
JavaScript
// if .. else var a = 42; if (a != 42) result = 0; else result = 1;
JavaScript
// mikael.kindborg@mobilesorcery.com - Function symbol is evaluated in bracket-less body of false if-statement var foo; // a var is only created automated by assignment if (foo !== undefined) foo(); result = 1;
JavaScript
/* Javascript eval */ // 42-tiny-js change begin ---> // in JavaScript eval is not JSON.parse // use parentheses or JSON.parse instead //myfoo = eval("{ foo: 42 }"); myfoo = eval("("+"{ foo: 42 }"+")"); //<--- 42-tiny-js change end result = eval("4*10+2")==42 && myfoo.foo==42;
JavaScript
// test for array join var a = [1,2,4,5,7]; result = a.join(",")=="1,2,4,5,7";
JavaScript
// generator-test function fibonacci(){ var fn1 = 1; var fn2 = 1; while (1){ var current = fn2; fn2 = fn1; fn1 = fn1 + current; var reset = yield current; if (reset){ fn1 = 1; fn2 = 1; } } } var generator = fibonacci(); generator.next(); // 1 genera...
JavaScript
// with-test var a; with(Math) a=PI; var b = { get_member : function() { return this.member;}, member:41 }; with(b) { let a = get_member(); //<--- a is local for this block var c = a+1; } result = a == Math.PI && c == 42;
JavaScript
// switch-case-tests //////////////////////////////////////////////////// // switch-test 1: case with break; //////////////////////////////////////////////////// var a1=5; var b1=6; var r1=0; switch(a1+5){ case 6: r1 = 2; break; case b1+4: r1 = 42; break; case 7: r1 = 2; break; } //////...
JavaScript
// function-closure var a = 40; // a global var function closure() { var a = 39; // a local var; return function() { return a; }; } var b = closure(); // the local var a is now hidden result = b()+3 == 42 && a+2 == 42;
JavaScript
// comparison var a = 42; result = a==42;
JavaScript
function FindProxyForURL(url, host) { PROXY = "PROXY yourhttpproxy:80"; DEFAULT = "DIRECT"; if(/^[\w\-]+:\/+(?!\/)(?:[^\/]+\.)?appspot\.com/i.test(url)) return PROXY; if(/^[\w\-]+:\/+(?!\/)(?:[^\/]+\.)?blogspot\.com/i.test(url)) return PROXY; if(/^[\w\-]+:\/+(?!\/)(\d{2,}\.)docs\.google\.com/i.test(url)) return P...
JavaScript
/* _/ _/_/ _/_/_/_/_/ _/ _/ _/ _/ _/_/ _/ _/ _/_/_/ _/_/_/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ ...
JavaScript
/* _/ _/_/ _/_/_/_/_/ _/ _/ _/ _/ _/_/ _/ _/ _/_/_/ _/_/_/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ ...
JavaScript
function initJQ() { $.jQTouch({ icon: '3txt.png', addGlossToIcon: false, preloadImages: [ 'themes/apple/img/chevron.png', 'themes/apple/img/back_button.png', 'themes/apple/img/button.png', 'themes/apple/img/pinstripes.png' ] }); } function noAjaxCache() { $.ajaxSetup ({ cache: false ...
JavaScript
$.fn.delay = function(time, callback){ // Empty function: jQuery.fx.step.delay = function(){}; // Return meaningless animation, (will be added to queue) return this.animate({delay:1}, time, callback); }
JavaScript
function getWindowHeight() { var windowHeight = 0; if (typeof(window.innerHeight) == 'number') { windowHeight = window.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else {...
JavaScript
function getWindowHeight() { var windowHeight = 0; if (typeof(window.innerHeight) == 'number') { windowHeight = window.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else {...
JavaScript
/** * @author Alexandre Magno * @desc Center a element with jQuery * @version 1.0 * @example * $("element").center({ * * vertical: true, * horizontal: true * * }); * @obs With no arguments, the default is above * @license free * @param bool vertical, bool horizontal * @contribution Paulo Radichi *...
JavaScript
/* Project: Input Placeholder Text Title: Automatic population of form fields with contents of title attributes Author Jon Gibbins (aka dotjay) Created: 13 Aug 2005 Modified: 26 Oct 2009 Notes: Add the following classes to text inputs or textareas to get the desired behaviour: auto-select Will pre-populat...
JavaScript
/* _/ _/_/ _/_/_/_/_/ _/ _/ _/ _/ _/_/ _/ _/ _/_/_/ _/_/_/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ ...
JavaScript
/* _/ _/_/ _/_/_/_/_/ _/ _/ _/ _/ _/_/ _/ _/ _/_/_/ _/_/_/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ ...
JavaScript
function initJQ() { $.jQTouch({ icon: '3txt.png', addGlossToIcon: false, preloadImages: [ 'themes/apple/img/chevron.png', 'themes/apple/img/back_button.png', 'themes/apple/img/button.png', 'themes/apple/img/pinstripes.png' ] }); } function noAjaxCache() { $.ajaxSetup ({ cache: false ...
JavaScript
$.fn.delay = function(time, callback){ // Empty function: jQuery.fx.step.delay = function(){}; // Return meaningless animation, (will be added to queue) return this.animate({delay:1}, time, callback); }
JavaScript
function getWindowHeight() { var windowHeight = 0; if (typeof(window.innerHeight) == 'number') { windowHeight = window.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else {...
JavaScript
/** * @author Alexandre Magno * @desc Center a element with jQuery * @version 1.0 * @example * $("element").center({ * * vertical: true, * horizontal: true * * }); * @obs With no arguments, the default is above * @license free * @param bool vertical, bool horizontal * @contribution Paulo Radichi *...
JavaScript
/* Project: Input Placeholder Text Title: Automatic population of form fields with contents of title attributes Author Jon Gibbins (aka dotjay) Created: 13 Aug 2005 Modified: 26 Oct 2009 Notes: Add the following classes to text inputs or textareas to get the desired behaviour: auto-select Will pre-populat...
JavaScript
/*! * jQuery doTimeout: Like setTimeout, but better! - v1.0 - 3/3/2010 * http://benalman.com/projects/jquery-dotimeout-plugin/ * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ // Script: jQuery doTimeout: Like setTimeout, but bett...
JavaScript
function getWindowHeight() { var windowHeight = 0; if (typeof(window.innerHeight) == 'number') { windowHeight = window.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else {...
JavaScript
function getWindowHeight() { var windowHeight = 0; if (typeof(window.innerHeight) == 'number') { windowHeight = window.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else {...
JavaScript
/** * @author Alexandre Magno * @desc Center a element with jQuery * @version 1.0 * @example * $("element").center({ * * vertical: true, * horizontal: true * * }); * @obs With no arguments, the default is above * @license free * @param bool vertical, bool horizontal * @contribution Paulo Radichi *...
JavaScript
/* Project: Input Placeholder Text Title: Automatic population of form fields with contents of title attributes Author Jon Gibbins (aka dotjay) Created: 13 Aug 2005 Modified: 26 Oct 2009 Notes: Add the following classes to text inputs or textareas to get the desired behaviour: auto-select Will pre-populat...
JavaScript
/*! * jQuery doTimeout: Like setTimeout, but better! - v1.0 - 3/3/2010 * http://benalman.com/projects/jquery-dotimeout-plugin/ * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ // Script: jQuery doTimeout: Like setTimeout, but bett...
JavaScript
function getWindowHeight() { var windowHeight = 0; if (typeof(window.innerHeight) == 'number') { windowHeight = window.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else {...
JavaScript
function getWindowHeight() { var windowHeight = 0; if (typeof(window.innerHeight) == 'number') { windowHeight = window.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else {...
JavaScript
/** * @author Alexandre Magno * @desc Center a element with jQuery * @version 1.0 * @example * $("element").center({ * * vertical: true, * horizontal: true * * }); * @obs With no arguments, the default is above * @license free * @param bool vertical, bool horizontal * @contribution Paulo Radichi *...
JavaScript
/* Project: Input Placeholder Text Title: Automatic population of form fields with contents of title attributes Author Jon Gibbins (aka dotjay) Created: 13 Aug 2005 Modified: 26 Oct 2009 Notes: Add the following classes to text inputs or textareas to get the desired behaviour: auto-select Will pre-populat...
JavaScript
function toggle(div_id) { var el = document.getElementById(div_id); if (el.style.display == 'none') { el.style.display = 'block'; } else { el.style.display = 'none'; } } function blanket_size(popUpDivVar) { if (typeof window.innerWidth != 'undefined') { viewportheight = window.innerHei...
JavaScript
$(document).ready( function () { if($.browser.msie){ $('.menu_wrap').css({'background-color' : '#b8e1fc','position' : 'absolute','width' : '100%'}); } $('.menu_wrap').css({'opacity' : '0.3'}); $('.menu_wrap').hover ( function () { $(this).animate({'margin-top' : '0px','opacity' : '1'}); $...
JavaScript
// JavaScript Document $(document).ready(function() { /* 1st example */ /// wrap inner content of each anchor with first layer and append background layer $("#menus li a").wrapInner( '<span class="out"></span>' ).append( '<span class="bg"></span>' ); // loop each anchor and add copy of text ...
JavaScript
function getCookie( name ) { var start = document.cookie.indexOf( name + "=" ); var len = start + name.length + 1; if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) { return null; } if ( start == -1 ) return null; var e...
JavaScript
//Style Sheet Switcher version 1.1 Oct 10th, 2006 //Author: Dynamic Drive: http://www.dynamicdrive.com //Usage terms: http://www.dynamicdrive.com/notice.htm var manual_or_random="manual" //"manual" or "random" var randomsetting="3 days" //"eachtime", "sessiononly", or "x days (replace x with desired integer)". Only ap...
JavaScript
$(document).ready( function () { if($.browser.msie){ $('.menu_wrap').css({'background-color' : '#b8e1fc','position' : 'absolute','width' : '100%'}); } $('.menu_wrap').css({'opacity' : '0.3'}); $('.menu_wrap').hover ( function () { $(this).animate({'margin-top' : '0px','opacity' : '1'}); $...
JavaScript
function fillUid() { var src = document.getElementById("source"); // Auto fill var uid = document.getElementById("name").value; var txtUid = src.contentDocument.getElementById("userId"); txtUid.value = uid; // Submit form src.contentDocument.getElementById("btnAddadmin").click(); } function reloadFrame() { var...
JavaScript
;(function ($, window, undefined){ 'use strict'; $.fn.foundationAccordion = function (options) { var $accordion = $('.accordion'); if ($accordion.hasClass('hover') && !Modernizr.touch) { $('.accordion li', this).on({ mouseenter : function () { console.log('due'); var p = ...
JavaScript
/* * jQuery Foundation Tooltips 2.0.1 * http://foundation.zurb.com * Copyright 2012, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ /*jslint unparam: true, browser: true, indent: 2 */ ;(function ($, window, undefined) { 'use strict'; var settings = { ...
JavaScript
/* * jQuery Foundation Clearing 1.0 * http://foundation.zurb.com * Copyright 2012, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ /*jslint unparam: true, browser: true, indent: 2 */ ;(function ($, window, undefined) { 'use strict'; var defaults = { ...
JavaScript
/* * jQuery Foundation Magellan 0.0.1 * http://foundation.zurb.com * Copyright 2012, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ /*jslint unparam: true, browser: true, indent: 2 */ ;(function ($, window, undefined) { 'use strict'; $.fn.foundationMagellan...
JavaScript
;(function ($, window, undefined) { 'use strict'; $.fn.foundationAlerts = function (options) { var settings = $.extend({ callback: $.noop }, options); $(document).on("click", ".alert-box a.close", function (e) { e.preventDefault(); $(this).closest(".alert-box").fadeOut(function...
JavaScript
;(function ($, window, undefined) { 'use strict'; var $doc = $(document), Modernizr = window.Modernizr; $(document).ready(function() { $.fn.foundationAlerts ? $doc.foundationAlerts() : null; $.fn.foundationButtons ? $doc.foundationButtons() : null; $.fn.foundationAccordion ...
JavaScript
/* * jQuery Reveal Plugin 1.1 * www.ZURB.com * Copyright 2010, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ /*globals jQuery */ (function ($) { 'use strict'; // // Global variable. // Helps us determine if the current modal is being queued for display. ...
JavaScript
;(function ($, window, document, undefined) { 'use strict'; var settings = { callback: $.noop, init: false }, methods = { init : function (options) { settings = $.extend({}, options, settings); return this.each(function () { if (!settings.init)...
JavaScript
/* * jQuery Foundation Top Bar 2.0.2 * http://foundation.zurb.com * Copyright 2012, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ /*jslint unparam: true, browser: true, indent: 2 */ ;(function ($, window, undefined) { 'use strict'; var settings = { i...
JavaScript
/* * jQuery Orbit Plugin 1.4.0 * www.ZURB.com/playground * Copyright 2010, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ (function ($) { 'use strict'; $.fn.findFirstImage = function () { return this.first() .find('img') .andSelf...
JavaScript
/*! http://mths.be/placeholder v2.0.7 by @mathias */ ;(function(window, document, $) { var isInputSupported = 'placeholder' in document.createElement('input'), isTextareaSupported = 'placeholder' in document.createElement('textarea'), prototype = $.fn, valHooks = $.valHooks, hooks, placeholde...
JavaScript
/* * jQuery Foundation Joyride Plugin 2.0.2 * http://foundation.zurb.com * Copyright 2012, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ /*jslint unparam: true, browser: true, indent: 2 */ ;(function ($, window, undefined) { 'use strict'; var defaults = { ...
JavaScript
;(function ($, window, undefined) { 'use strict'; $.fn.foundationMediaQueryViewer = function (options) { var settings = $.extend(options,{toggleKey:77}), // Press 'M' $doc = $(document); $doc.on("keyup.mediaQueryViewer", ":input", function (e){ if (e.which === settings.toggleKey) { ...
JavaScript
/* * jQuery Custom Forms Plugin 1.0 * www.ZURB.com * Copyright 2010, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ (function( $ ){ /** * Helper object used to quickly adjust all hidden parent element's, display and visibility properties. * This is curre...
JavaScript
;(function ($, window, undefined) { 'use strict'; $.fn.foundationButtons = function (options) { var $doc = $(document), config = $.extend({ dropdownAsToggle:true, activeClass:'active' }, options), // close all dropdowns except for the dropdown passed closeDropdowns = func...
JavaScript
;(function ($, window, undefined) { 'use strict'; $.fn.foundationNavigation = function (options) { var lockNavBar = false; // Windows Phone, sadly, does not register touch events :( if (Modernizr.touch || navigator.userAgent.match(/Windows Phone/i)) { $(document).on('click.fndtn touchstart.fndtn...
JavaScript
// Place your application-specific JavaScript functions and classes here // This file is automatically included by javascript_include_tag :defaults
JavaScript
/** Copyright (c) 2005, Brad Neuberg, bkn3@columbia.edu http://codinginparadise.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation...
JavaScript
// TODO Change to dropping the name property off the input element when in example mode TextFieldWithExample = Class.create(); TextFieldWithExample.prototype = { initialize: function(inputElementId, defaultText, options) { this.setOptions(options); this.input = $(inputElementId); this.name = this.inpu...
JavaScript
/** * * Copyright 2005 Sabre Airline Solutions * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
JavaScript
if (typeof Prototype == 'undefined') { warning = "ActiveScaffold Error: Prototype could not be found. Please make sure that your application's layout includes prototype.js (e.g. <%= javascript_include_tag :defaults %>) *before* it includes active_scaffold.js (e.g. <%= active_scaffold_includes %>)."; alert(warning);...
JavaScript
// Flash Player Version Detection - Rev 1.6 // Detect Client Browser type // Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var isOp...
JavaScript
BrowserHistoryUtils = { addEvent: function(elm, evType, fn, useCapture) { useCapture = useCapture || false; if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if (elm.attachEvent) { var r = elm.attachEvent...
JavaScript
(function(exports){ crossfilter.version = "1.2.0"; function crossfilter_identity(d) { return d; } crossfilter.permute = permute; function permute(array, index) { for (var i = 0, n = index.length, copy = new Array(n); i < n; ++i) { copy[i] = array[index[i]]; } return copy; } var bisect = crossfilter.bisect ...
JavaScript
function run_test() { var sides = 1; var alternativeOption = getSelected(document.getElementById('alternative-options')); var dataSetOne = document.getElementById('sample_one').content; var dataSetTwo = document.getElementById('sample_two').content; console.log(dataSetTwo); if(alternativeO...
JavaScript
if (window.File && window.FileReader && window.FileList && window.Blob) { // alert('Great success! All the File APIs are supported.'); } else { alert('The File APIs are not fully supported in this browser.'); } var numberOfBars = 40; // Rough value can be n-1 or n function handleFileSelect(evt) { inse...
JavaScript
/** * This jQuery plugin displays pagination links inside the selected elements. * * This plugin needs at least jQuery 1.4.2 * * @author Gabriel Birke (birke *at* d-scribe *dot* de) * @version 2.0rc * @param {int} maxentries Number of entries to paginate * @param {Object} opts Several options (see README for d...
JavaScript
/** * Cookie plugin * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * Create a cookie with the given name and value and other optional parameters. * * @examp...
JavaScript
/** * @author Remy Sharp * @url http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/ */ (function ($) { $.fn.hint = function (blurClass) { if (!blurClass) { blurClass = 'blur'; } return this.each(function () { // get jQuery version of 'this' var $input = $(this), // capture...
JavaScript
/** * Cookie plugin * * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * Create a cookie with the given name and value and other optional parameters. * * @examp...
JavaScript
/** * Confirm plugin 1.3 * * Copyright (c) 2007 Nadia Alramli (http://nadiana.com/) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. */ /** * For more docs and examples visit: * http://nadiana.com/jquery-confirm-plugin * For comments, suggestions or bug reporting, * email...
JavaScript
/* * Inline Form Validation Engine 2.1, jQuery plugin * * Copyright(c) 2010, Cedric Dugas * http://www.position-absolute.com * * 2.0 Rewrite by Olivier Refalo * http://www.crionics.com * * Form validation engine allowing custom regex rules to be added. * Licensed under the MIT License */ (function($) { ...
JavaScript
/** * AJAX Upload ( http://valums.com/ajax-upload/ ) * Copyright (c) Andris Valums * Licensed under the MIT license ( http://valums.com/mit-license/ ) * Thanks to Gary Haran, David Mark, Corey Burns and others for contributions */ (function () { /* global window */ /* jslint browser: true, devel: true, u...
JavaScript
if(typeof(JS_WP_ESTORE_VARIATION_ADD_STRING) == 'undefined') { JS_WP_ESTORE_VARIATION_ADD_STRING = "+"; } if(typeof(JS_WP_ESTORE_CURRENCY_SYMBOL) == 'undefined') { JS_WP_ESTORE_CURRENCY_SYMBOL = "$"; } if(typeof(JS_WP_ESTORE_VARIATION_THOUSAND_SEPERATOR) == 'undefined') { JS_WP_ESTORE_VARIATION_THOUSAND_SEPERATOR = ...
JavaScript
$(document).ready(function() { $("#foo4").carouFredSel({ circular : false, infinite : true, auto: {pauseDuration: 3000, delay: 750}, scroll: {fx: "fade"}, items: { pauseOnHover: true }, prev : { button : "#foo4_prev", key : "left", items : 4, easing : "easeInOutCubic", duratio...
JavaScript
//Style Sheet Switcher version 1.1 Oct 10th, 2006 //Author: Dynamic Drive: http://www.dynamicdrive.com //Usage terms: http://www.dynamicdrive.com/notice.htm var manual_or_random="manual" //"manual" or "random" var randomsetting="3 days" //"eachtime", "sessiononly", or "x days (replace x with desired integer)". On...
JavaScript
$(function () { if ($.browser.msie && $.browser.version < 7) return; $('.logo').removeClass('highlight') .find('a').append('<span class="hover" />').each(function () { var $span = $('> span.hover', this).css('opacity', 0); $(this).hover(function () { //on hover $span.stop().fadeTo(2...
JavaScript
(function ($) { $.fn.jCarouselLite = function (o) { o = $.extend({ btnPrev: null, btnNext: null, btnGo: null, mouseWheel: false, auto: null, speed: 200, easing: null, vertical: false, circular: true, ...
JavaScript
$.fn.paginate = function(options) { var options = jQuery.extend({ content: 'TBODY TR', limit: 5 },options); return this.each(function() { var page = {}; page.parent = $(this), page.content = (page.parent.is('TABLE')) ? page...
JavaScript
// ColorBox v1.3.16 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+ // Copyright (c) 2011 Jack Moore - jack@colorpowered.com // Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php (function ($, document, window) { var // ColorBox Default Settings. // See ht...
JavaScript
/* * jQuery Easing v1.1.1 - http://gsgd.co.uk/sandbox/jquery.easing.php * * Uses the built in easing capabilities added in jQuery 1.1 * to offer multiple easing options * * Copyright (c) 2007 George Smith * Licensed under the MIT License: * http://www.opensource.org/licenses/mit-license.php */ jQuery.extend...
JavaScript
try { var playlistReady = playerReady; } catch (err){ } playerReady = function(obj) { setTimeout(function(){checkPlaylistLoaded(obj)}, 1); try { playlistReady(obj); } catch (err){ } } function itemHandler(obj) { var item = obj['index']; var playlist = $("#"+obj['id']).next(); var currentItem = 0; playlist....
JavaScript
/* * jQuery Nivo Slider v2.3 * http://nivo.dev7studios.com * * Copyright 2010, Gilbert Pellegrom * Free to use and abuse under the MIT license. * http://www.opensource.org/licenses/mit-license.php * * May 2010 - Pick random effect from specified set of effects by toronegro * May 2010 - controlNavThumbsFromRel...
JavaScript
/** * jQuery.ScrollTo * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under MIT and GPL. * Date: 5/25/2009 * * @projectDescription Easy element scrolling using jQuery. * http://flesler.blogspot.com/2007/10/jqueryscrollto.html * Works with jQuery ...
JavaScript
$(document).ready function() { $("#foo4").carouFredSel({ circular : false, infinite : true, auto: {pauseDuration: 3000, delay: 750}, scroll: {fx: "fade"}, items: { pauseOnHover: true }, prev : { button : "#foo4_prev", key : "left", items : 4, easing : "easeInOutCubic", duratio...
JavaScript
$(document).ready(function() { /// wrap inner content of each anchor with first layer and append background layer $("#BMenu li a").wrapInner( '<span class="out"></span>' ).append( '<span class="bg"></span>' ); // loop each anchor and add copy of text content $("#BMenu li a").each(function() { $( '...
JavaScript
//** Tab Content script v2.0- ? Dynamic Drive DHTML code library (http://www.dynamicdrive.com) //** Updated Oct 7th, 07 to version 2.0. Contains numerous improvements: // -Added Auto Mode: Script auto rotates the tabs based on an interval, until a tab is explicitly selected // -Ability to expand/contract arbitra...
JavaScript
//Style Sheet Switcher version 1.1 Oct 10th, 2006 //Author: Dynamic Drive: http://www.dynamicdrive.com //Usage terms: http://www.dynamicdrive.com/notice.htm var manual_or_random="manual" //"manual" or "random" var randomsetting="3 days" //"eachtime", "sessiononly", or "x days (replace x with desired integer)". Only ap...
JavaScript
//Style Sheet Switcher version 1.1 Oct 10th, 2006 //Author: Dynamic Drive: http://www.3zfaldmo3.com //Usage terms: http://www.dynamicdrive.com/notice.htm var manual_or_random="manual" //"manual" or "random" var randomsetting="3 days" //"eachtime", "sessiononly", or "x days (replace x with desired integer)". Only ...
JavaScript
/* * jQuery carouFredSel 5.5.0 * Demo's and documentation: * caroufredsel.frebsite.nl * * Copyright (c) 2012 Fred Heusschen * www.frebsite.nl * * Dual licensed under the MIT and GPL licenses. * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License */ ...
JavaScript