Welcome to TalkGraphics.com
Results 1 to 7 of 7
  1. #1

    Default Smooth effect to anchor

    Hi,

    This site http://www.n90media.de/ is made in Xara.
    How can i do the same smooth effect to an anchor?

    Thanks in advance,


    J-C

  2. #2
    Join Date
    Jan 2010
    Location
    Bradford, England
    Posts
    1,827

    Default Re: Smooth effect to anchor

    First Add the following code to the <head> section in the placeholder tab of web properties

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript">// <![CDATA[
    jQuery.noConflict();

    function scroller(anchor, delay) {
    jQuery('html,body').animate({scrollTop: jQuery(anchor).offset().top}, delay);
    };
    // ]]>
    </script>


    Next add the object you want to scroll to and name it anchorOnPage (right click the object and click on 'Names', add anchorOnPage into the 'Apply name' field and click on 'Add' then ok.

    Next click on the button you want to us and in the 'link' tab in web properties add the following code

    javascript:scroller('#anchorOnPage', 1000);

    The green number is the speed of the scroll in milliseconds, the smaller the number the quicker the scroll

    You can add as many anchors as you want, just make sure to change the name you give the anchor so for instance anchorOnPage2, anchorOnPage3 and so on. and of course change the blue text above to the name of the anchor you are linking to.

    You only need to add the long code in the head section once, no matter how many anchors you have.
    Flawless Form. Faultless Function. Crafted by Cloud

    https://www.cloudwebagency.co.uk

  3. #3

    Default Re: Smooth effect to anchor

    1000 x thanks, I'll give it a shot

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

    Default Re: Smooth effect to anchor

    awesome!!!! thank you....but, if i want to scroll form bottom to top and from left to right and from right to left? is it possible?
    thank you in advance

  5. #5
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,827

    Default Re: Smooth effect to anchor

    Quote Originally Posted by ceramik View Post
    awesome!!!! thank you....but, if i want to scroll form bottom to top and from left to right and from right to left? is it possible?
    thank you in advance
    You can check my original Post: http://www.talkgraphics.com/showthre...ht=%3Ascroller.
    Such scrolling is only vertical as the event does not care where the anchor is horizontally.
    So you scroll upwards, you have the anchor Name above the link that is the action to scroll to the anchor.

    You might be able to use Zoomoom.s to achive a left-right positional scroll: http://jaukia.github.io/zoomooz/.

    Acorn

  6. #6

    Default Re: Smooth effect to anchor

    Acorn, you are the master of gizmos!

  7. #7
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,827

    Default Re: Smooth effect to anchor

    You might be able to use Zoomoom.s to achive a left-right positional scroll: http://jaukia.github.io/zoomooz/.
    But not of the keyboard; it should have read Zoomooz.js!

    Acorn

 

 

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
  •