New to javascript & jquery. Am I not closing something correctly? Dreamweaver only says "Syntax Error" -


<script>     $(document).ready(function () {         // code bring each link on screen , in position         $("#link1").animate({             left: '30px',             top: '5px'         }, 1000);         $("#link2").animate({             left: '80px',             top: '5px'         }, 1400);         $("#link3").animate({             left: '130px',             top: '5px'         }, 1400);         $("#link4").animate({             left: '180px',             top: '5px'         }, 1600);         $("#link5").animate({             left: '230px',             top: '5px'         }, 1800);          // fade in & out on hover         $("#link1").hover(function () {             $(this).fadeout(150);             $(this).fadein(150);         });          // fade in & out on hover         $("#link2").hover(function () {             $(this).fadeout(150);             $(this).fadein(150);         });          // fade in & out on hover         $("#link3").hover(function () {             $(this).fadeout(150);             $(this).fadein(150);         });          // fade in & out on hover         $("#link4").hover(function () {             $(this).fadeout(150);             $(this).fadein(150);         });          // fade in & out on hover         $("#link5").hover(function () {             $(this).fadeout(150);             $(this).fadein(150);         });          // nudge link when "clicked"         $("#link1").mousedown(function () {             $(this).css("padding-top", "5px");         });          $("#link1").mouseup(function () {             $(this).css("padding-top", "0px");         });          // nudge link when "clicked"         $("#link2").mousedown(function () {             $(this).css("padding-top", "5px");         });          $("#link2").mouseup(function () {             $(this).css("padding-top", "0px");         });          // nudge link when "clicked"         $("#link3").mousedown(function () {             $(this).css("padding-top", "5px");         });          $("#link3").mouseup(function () {             $(this).css("padding-top", "0px");         });          // nudge link when "clicked"         $("#link4").mousedown(function () {             $(this).css("padding-top", "5px");         });          $("#link4").mouseup(function () {             $(this).css("padding-top", "0px");         });          // nudge link when "clicked"         $("#link5").mousedown(function () {             $(this).css("padding-top", "5px");         });          $("#link5").mouseup(function () {             $(this).css("padding-top", "0px");         });            // parallax scroll         $(window).bind('scroll', function (e) {             parallaxscroll();         });          function parallaxscroll() {                 var scrolledy = $(window).scrolltop();                 $('#bblogo1').css('top', '-' + ((scrolledy * 0.6)) + 'px');                 $('#bblogo2').css('top', '-' + ((scrolledy * 0.5)) + 'px');                 $('#bblogo3').css('top', '-' + ((scrolledy * 0.3)) + 'px');                 $('#bblogo4').css('top', '-' + ((scrolledy * 0.9)) + 'px');                 $('#bblogo5').css('top', '-' + ((scrolledy * 0.6)) + 'px');                 $('#bblogo6').css('top', '-' + ((scrolledy * 0.1)) + 'px');                 $('#bblogo7').css('top', '-' + ((scrolledy * 0.4)) + 'px');                  $('#bbspinner').animate(function (){                     $(this).css ("background","url(images/bblogorender0000.png)");                 });           }); </script> 

replace code 1 missing closing brackets

       $(document).ready(function ()          // code bring each link on screen , in position                       {  $("#link1").animate({             left: '30px',             top: '5px'         }, 1000);         $("#link2").animate({             left: '80px',             top: '5px'         }, 1400);         $("#link3").animate({             left: '130px',             top: '5px'         }, 1400);         $("#link4").animate({             left: '180px',             top: '5px'         }, 1600);         $("#link5").animate({             left: '230px',             top: '5px'         }, 1800);          // fade in & out on hover         $("#link1").hover(function () {             $(this).fadeout(150);             $(this).fadein(150);         });          // fade in & out on hover         $("#link2").hover(function () {             $(this).fadeout(150);             $(this).fadein(150);         });          // fade in & out on hover         $("#link3").hover(function () {             $(this).fadeout(150);             $(this).fadein(150);         });          // fade in & out on hover         $("#link4").hover(function () {             $(this).fadeout(150);             $(this).fadein(150);         });          // fade in & out on hover         $("#link5").hover(function () {             $(this).fadeout(150);             $(this).fadein(150);         });          // nudge link when "clicked"         $("#link1").mousedown(function () {             $(this).css("padding-top", "5px");         });          $("#link1").mouseup(function () {             $(this).css("padding-top", "0px");         });          // nudge link when "clicked"         $("#link2").mousedown(function () {             $(this).css("padding-top", "5px");         });          $("#link2").mouseup(function () {             $(this).css("padding-top", "0px");         });          // nudge link when "clicked"         $("#link3").mousedown(function () {             $(this).css("padding-top", "5px");         });          $("#link3").mouseup(function () {             $(this).css("padding-top", "0px");         });          // nudge link when "clicked"         $("#link4").mousedown(function () {             $(this).css("padding-top", "5px");         });          $("#link4").mouseup(function () {             $(this).css("padding-top", "0px");         });          // nudge link when "clicked"         $("#link5").mousedown(function () {             $(this).css("padding-top", "5px");         });          $("#link5").mouseup(function () {             $(this).css("padding-top", "0px");         });            // parallax scroll         $(window).bind('scroll', function (e) {             parallaxscroll();         });          function parallaxscroll() {                 var scrolledy = $(window).scrolltop();                 $('#bblogo1').css('top', '-' + ((scrolledy * 0.6)) + 'px');                 $('#bblogo2').css('top', '-' + ((scrolledy * 0.5)) + 'px');                 $('#bblogo3').css('top', '-' + ((scrolledy * 0.3)) + 'px');                 $('#bblogo4').css('top', '-' + ((scrolledy * 0.9)) + 'px');                 $('#bblogo5').css('top', '-' + ((scrolledy * 0.6)) + 'px');                 $('#bblogo6').css('top', '-' + ((scrolledy * 0.1)) + 'px');                 $('#bblogo7').css('top', '-' + ((scrolledy * 0.4)) + 'px');                  $('#bbspinner').animate(function (){                     $(this).css ("background","url(images/bblogorender0000.png)");                 });         }                       }); 

you can check javascript validation here http://jsfiddle.net/


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -