Announcement

Collapse
No announcement yet.

Back to top

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Back to top

    Is there code available to add a back-to-top in Shadows 2.0?
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    Hi Leslie,

    There is not currently an extension for Shadows with this functionality.
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Old, but works:

      ::::: HTML :::::
      <div id="js-chaser" class="back-to-top"><span class="u-icon-triangle-up" title="Back to Top"></span></div>

      ::::: JS ::::::
      // ---- Back to Top Controls---- //
      function backToTop () {
      var chaser = $('#js-chaser')
      windowHeight = $(window).height();
      if (chaser) {
      $(window).scroll(function() {
      if ($(window).scrollTop() >= windowHeight / 2) {
      chaser.addClass("pullIn");
      helpIcon.addClass("pullIn");
      }
      else {
      chaser.removeClass("pullIn");
      helpIcon.removeClass("pullIn");
      };
      });
      chaser.on('click', function () {
      $('html, body').animate({scrollTop: '0px'}, 800);
      });
      };
      };
      if ($(window).innerWidth() >= 768) {
      var backToTop = new backToTop;
      };

      ::::: CSS :::::
      .back-to-top {
      color: #fff;
      cursor: pointer;
      position: fixed;
      right: -2rem;
      bottom: 6rem;
      text-align: center;
      background: #327840;
      border-radius: 0.25em;
      padding: 0.4em 0.4em;
      z-index: 2;
      opacity: 0;
      -webkit-transition: .2s ease-in-out all;
      transition: .2s ease-in-out all;
      }
      .back-to-top.pullIn {
      right: 2rem;
      opacity: 1;
      }

      -Ryan

      Comment


        #4
        Thanks Ryan, I was wondering if I could use that code
        Leslie Kirk
        Miva Certified Developer
        Miva Merchant Specialist since 1997
        Previously of Webs Your Way
        (aka Leslie Nord leslienord)

        Email me: [email protected]
        www.lesliekirk.com

        Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

        Comment

        Working...
        X