jquery scrolling in Web Designer
Hey there,
since I wasn't able to solve this problem over at xara-users, I will try my luck here :)
The page I have a problem with is: www.n90mediatest.magix.net/public
The menu has several Links on it. These are linked to anchors on the page.
In the head code I put this code:
-----------------------------------------
<!-- jQuery enbinden von Google-->
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
// jQuery laden
google.load("jquery", "1.3.2");
</script>
<!-- jQuery Code -->
<script type="text/javascript">
$(document).ready(function() {
// Alle internen Links auswählen
$('a[href*=#]').bind("click", function(event) {
// Standard Verhalten unterdrücken
event.preventDefault();
// Linkziel in Variable schreiben
var ziel = $(this).attr("href");
//Scrollen der Seite animieren, body benötigt für Safari
$('html,body').animate({
//Zum Ziel scrollen (Variable)
scrollTop: $(ziel).offset().top
// Dauer der Animation und Callbackfunktion die nach der Animation aufgerufen wird, sie stellt das Standardverhalten wieder her und ergänzt die URL
}, 2000 , function (){location.hash = ziel;});
});
return false;
});
</script>
--------------------------------------
The script worked fine until about 3 weeks ago, since then the automatic scrolling when clicking on one of these links doesn't work anymore.
Do you have any solutions?
Thanks!
-David
Re: jquery scrolling in Web Designer
Re: jquery scrolling in Web Designer
haha thanks :D Cool to see you on this forum :)
Re: jquery scrolling in Web Designer
Re: jquery scrolling in Web Designer
Quote:
Originally Posted by
Acorn
´
awesome, thank you! That works fine!
Re: jquery scrolling in Web Designer
Hi David,
Great looking site. However it's completely broken in Firefox and Internet Explorer 10. It only displays fine in Chrome (except the mentioned scroll problem). Is this directly exported and uploaded by Xara Web Designer?
Re: jquery scrolling in Web Designer
Thank you very much!
At the moment it is more than broken, my internet at home is probably the most annoying thing on earth. Filezilla always bombards me with error messages, disconnections and stuff :/ Have to upload it again when I am at work ;)
Re: jquery scrolling in Web Designer
good evening...i tested the code above and all worked fine. but i'd like to scroll in horizontal way...how must i change the code? thank you in advance...
Paolo
Re: jquery scrolling in Web Designer
Paolo, all of it would change.
Look at http://tympanus.net/codrops/2010/06/...g-with-jquery/.
Good luck.
Acorn