Welcome to TalkGraphics.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2013
    Location
    Germany
    Posts
    7

    Default 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

  2. #2
    Join Date
    Aug 2007
    Location
    Maghull UK
    Posts
    6,202

    Default Re: jquery scrolling in Web Designer

    JOHN -XaReg (FB) XaReg (DB - ignore prompt to register)
    Windows 10 [Anniversary] pro Intel Pentium CPU G630 @ 2.70Ghz RAM: 4 GB; 64-bit x64

  3. #3
    Join Date
    Jun 2013
    Location
    Germany
    Posts
    7

    Default Re: jquery scrolling in Web Designer

    haha thanks Cool to see you on this forum

  4. #4
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,749

    Default Re: jquery scrolling in Web Designer


  5. #5
    Join Date
    Jun 2013
    Location
    Germany
    Posts
    7

    Default Re: jquery scrolling in Web Designer

    Quote Originally Posted by Acorn View Post
    ´
    awesome, thank you! That works fine!

  6. #6
    Join Date
    Jul 2001
    Location
    Lisbon, Portugal
    Posts
    1,043

    Default 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?

  7. #7
    Join Date
    Jun 2013
    Location
    Germany
    Posts
    7

    Default 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

  8. #8
    Join Date
    Jan 2008
    Location
    Ferrara, North of italy
    Posts
    62

    Default 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

  9. #9
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,749

    Default 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

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •