Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Sliding Panels

Options
  • 06-10-2015 4:59pm
    #1
    Registered Users Posts: 874 ✭✭✭


    Ideally looking for an "off the shelf" script that can handle this - I've searched high and low but can't seem to find one.

    See my beautifully designed prototype below!!! :)

    vPKjTNt.png


Comments

  • Registered Users Posts: 12 UnquieUserName


    Hi

    If you attach the sample HTML, I will have a look to see if I can help you


  • Registered Users Posts: 241 ✭✭fcrossen




  • Registered Users Posts: 874 ✭✭✭devildriver


    Hi

    If you attach the sample HTML, I will have a look to see if I can help you


    Thanks. In the end I've had to go back to the previous version of the site to try and detangle the code.

    I've narrowed the functionality down to this portion of the js file:
    Darkale.info = {
    
      initialize: function() {
        this.click();
      },
    
      initialMove: function() {
        var url = window.location.pathname;
        if (Resolution.lt980() || url === '/info') {
          return false;
        } else {
          var slideshowTop = $('section#viewer');
          Darkale.global.scroll(slideshowTop, 0, 800);
          Darkale.slideshow.loadImages();
          Darkale.slideshow.showSlideshow();
        }
      },
    
      moreInfo: function() {
        var trigger = $('.info-more'),
            excerpt = $('.info-excerpt'),
            full    = $('.info-full');
    
        excerpt.toggleClass('excerpt-move-left');
        full.toggleClass('full-move-left');
        trigger.toggleClass('active');
        if (trigger.hasClass('active')) {
          trigger.html('Read less...');
          if (Resolution.mt1024()) {
            var infoTop = $('section#info');
            Darkale.global.scroll(infoTop, 0, 500);
          }
          $('body').css('overflow', 'hidden');
        } else {
          trigger.html('Read more...');
          $('body').css('overflow', 'visible');
        }
    
        if (Resolution.lt1024()) {
          full.slideToggle();
          $('body').css('overflow', 'visible');
        }
      },
    
      click: function() {
        $('a#info').on('click', function(){
          var infoSection = $('section#info');
          Darkale.global.scroll(infoSection, 0, 500);
        });   
    
        $('.info-more').on('click', function(){
          Darkale.info.moreInfo();
        });
    
        $('.showreel-trigger').on('click', function() {
          $('.entry-70 a').trigger('click').addClass('from-info');
        });
      }
    
    }
    

    I've recreated the HTML and CSS using all of the same classes and identifiers but cannot get the click scroll function to work. Is the window.location.pathname affecting that functionality as that path is different on the new site? thanks.


    UPDATE: There was a hidden js file that contained the missing functions! I hate rooting through other people's code!


Advertisement