Page 1 of 1

Two issues: jQuery not working and menu issue

Posted: Tue Dec 07, 2010 10:39 am
by Alain
Hey there,

I've been working on another site and once more, I seem to encounter the issue where jQuery doesn't do the job it is supposed to do. Instead of animating a scroll to the top of the page when a user clicks on 'top' in the footer, it doesn't do that. It just pops to the top. I haven't got Javascript disabled in my browser, so that doesn't seem to be the cause of this.

I put the as an echo in UTD. Here's the code:

[php]
echo ('

$(document).ready(function(){

$("block1").load(function() {
$(this).stop().animate({"opacity": "0.4"}, "slow");
});

$("#block1").mouseover(function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});
$("#block1").mouseout(function() {
$(this).stop().animate({"opacity": "0.6"}, "slow");
});

$("#block2").mouseover(function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});
$("#block2").mouseout(function() {
$(this).stop().animate({"opacity": "0.6"}, "slow");
});

$("#block3").mouseover(function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});
$("#block3").mouseout(function() {
$(this).stop().animate({"opacity": "0.6"}, "slow");
});

$("#block4").mouseover(function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});
$("#block4").mouseout(function() {
$(this).stop().animate({"opacity": "0.6"}, "slow");
});

$("#block5").mouseover(function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});
$("#block5").mouseout(function() {
$(this).stop().animate({"opacity": "0.6"}, "slow");
});
});

               
                       $(document).ready(function() {
                       $(".scroll").click(function(){
                       $("html, body").animate({scrollTop:0}, "slow");
                       return false;
                       });
                       });
               
');
[/php]


The second issue would be the menu: it seems that whenever I right click on a submenu item, it pops from it's original position. Any idea why this is happening?


Any help would be greatly appreciated.

The website may be found at: http://www.solidscan.nl.