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 getParameterByName(name) | |
{ | |
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); | |
var regexS = "[\\?&]" + name + "=([^&#]*)"; | |
var regex = new RegExp(regexS); | |
var results = regex.exec(window.location.search); | |
if(results == null) | |
return ""; | |
else | |
return decodeURIComponent(results[1].replace(/\+/g, " ")); |
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
<script> | |
$(window).resize(function() { | |
var windowWidth = $(window).width(); | |
$('.screen-width').text(windowWidth + 'px'); | |
}); | |
</script> | |
<div id="debug" style="position:fixed;padding:0.3em 0.6em;background:#f1f1f1;font-size:0.6em;bottom:0;left:50%;"> | |
<span class="screen-width">0</span> | |
</div> |
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-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
{ | |
"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
var url = document.URL; | |
$('#menu a[href="'+url+'"]').addClass('active'); |