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(){ | |
// bind change event to select | |
$('.countrySiteDropdown').bind('change', function () { | |
var url = $(this).val(); // get selected value | |
if (url) { // require a URL | |
window.location = url; // redirect | |
} | |
return false; | |
}); |
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 jsLang = 'jquery'; | |
switch (jsLang) { | |
case 'jquery': | |
alert('jQuery Wins!'); | |
break; | |
case 'prototype': | |
alert('prototype Wins!'); | |
break; | |
case 'mootools': | |
alert('mootools Wins!'); |
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')[0].lang | |
alert($('html').attr('lang')); |
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
Show hidden characters
{ | |
"files": | |
{ | |
"jquery": "http://code.jquery.com/jquery.min.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", | |
"jquery-mobile-vmouse": "https://raw.github.com/jquery/jquery-mobile/master/js/jquery.mobile.vmouse.js", | |
"jquery-mousewheel": "https://raw.github.com/brandonaaron/jquery-mousewheel/master/jquery.mousewheel.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
{ | |
"files": | |
{ | |
"jquery" : "http://code.jquery.com/jquery.min.js", | |
"jquery-ui-effects" : "https://raw.github.com/jquery/jquery-ui/master/ui/jquery.effects.core.js", | |
"jquery-mobile-vmouse" : "https://raw.github.com/jquery/jquery-mobile/master/js/jquery.mobile.vmouse.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", | |
"jquery-url" : "https://raw.github.com/allmarkedup/jQuery-URL-Parser/master/jquery.url.js", | |
"jquery-dotimeout" : "https://raw.github.com/cowboy/jquery-dotimeout/master/jquery.ba-dotimeout.min.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($){ | |
$.fn.scrollFixed = function(params){ | |
params = $.extend( {appearAfterDiv: 0, hideBeforeDiv: 0}, params); | |
var element = $(this); | |
if(params.appearAfterDiv) | |
var distanceTop = element.offset().top + $(params.appearAfterDiv).outerHeight(true) + element.outerHeight(true); | |
else | |
var distanceTop = element.offset().top; | |
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 url = document.URL; | |
$('#menu a[href="'+url+'"]').addClass('active'); |
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><body> | |
<style> | |
#search { | |
background-color: #999; | |
width: 100px; | |
border: 1px solid #ddd; | |
outline: none; | |
} | |
</style> |