Triggering Script Via Url
I have this script calling a lightbox to trigger if the URL is site.com/page.html?globe=1 and it is not working here is the code: var $j = jQuery.noConflict(); $j(document).ready(
Solution 1:
var$j = jQuery.noConflict();
$j(document).ready(function() {
var url = window.location.href;
url = url.toLowerCase();
if (url.indexOf('globe=1') != -1) {
$j("a#fancy").fancybox({
'padding': 0,
'overlayShow': false// extra comma removed
});
}
}); // extra curly bracket removed$j("a#fancy").fancybox({
'padding': 0,
'overlayShow': false// extra comma removed
});
There were few errors - a bracket, and 2 commas. Use visual IDE to track the brackets.
Post a Comment for "Triggering Script Via Url"