Giter Club home page Giter Club logo

skrollr-decks's Introduction

#skrollr-decks

skrollr plugin for fullpage presentation decks

##Installation

bower i skrollr-decks
<body class="skrollr-decks-init" data-skrollr-decks-history="true">
	<main id="skrollr-body">
		<section class="skrollr-deck"></section>
		<section class="skrollr-deck"></section>
		<section class="skrollr-deck"></section>
	</main>
</body>

##API

###skrollr.decks.init(options)

  • options.decks (.skrollr-deck) - decks classname
  • offset (10) - offset in percents to deck since which will autoscroll
  • duration (600) - scrolling duration
  • easing (quaratic) - scrolling easing, more
  • delay (500) - delay before scroll
  • autoscroll (true)
  • history (false) - hash navigation

###skrollr.decks.refresh()

Recalc height of all decks. Need to update when content added

###skrollr.decks.animateTo(anchor, noAnimation)

  • anchor - #id of deck, up or down
  • noAnimation - prevents animation

###skrollr.decks.on(event, callback)

  • change(activeDeck) - calls when active deck is changed
  • render(e) - skrollr render event

##License

The MIT License (MIT)

Copyright © 2014 Bogdan Chadkin

skrollr-decks's People

Contributors

crispen-smith avatar qjake avatar trysound avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skrollr-decks's Issues

resizeDecks causing jump to another deck

If I'm on maybe the 5th deck and then use resizeDecks, after the resize the page is scrolling up the the prior deck. I found this could be prevented by adding this to the end of resizeDecks. This is similar to the current handling of skrollr.addEvent(window, 'load resize', function () { so I'm not aware of any downside to adding it.

if(currentDeck) {
    animateTo('#' + currentDeck.id, true);
}

Add reinitialize

There's already refresh function to re-calculate deck heights that change, but what about if we need to add/remove decks dynamically? It would be great if there was some way to do this, either by adding a reinitialize function or some other mechanism.

Ideas

  • Add callback option
  • Add active class to segment and navigation item
  • Auto add id to segment
  • goto method
  • Test in mobile browsers
  • Add scroll to deck time option

Disable auto-scroll?

I love the fullpage features of skrollr-decks, but I want to disable auto-scrolling (this takes away from all of the animations I have set up with skrollr). How can I disable auto-scrolling?

Application autoscrolls after bigvideo.js

In "section number two (#deck-2-video)" I use a fullscreen video (with bigvideo.js):

in index.html.erb

<section class="skrollr-deck" id="deck-2-video">
    <div class"row" id="video-row">
        <div class="col-md-12" id="video-container">
        </div>
    </div>
</section>

in application.html.erb

<script>
    $(function() {
        var BV = new $.BigVideo({container: $('#video-container')});
        BV.init();
        BV.show("<%= request.protocol + request.host_with_port + asset_path('video.mp4') %>",{ambient:true});
    });
</script>

When I scroll past #deck-2-video, the application auto scroll through the rest of the section that is under the section where bigvideo.js is present (#deck-2-video) until it hits the bottom of the document.

Any solution to this?

keep URL when change window.location

Hi everyone

I have a problem with the history.pushState(null, null, id) on Line 124. When I use it I don't get correct URL. With the following solution it work for me:
history.pushState(null, null,"//" + window.location.hostname + window.location.pathname + id);

Thanks
Samuel

Reinit after ajax

Need reinit with skrollr.stylesheets.js after ajax DOM-modification.

Animated scroll from anchor links

Hello,

I'm wondering if there is a way to get the smooth scroll animation similar to the nav using single anchor links? Right now the page simply jumps to the anchor, but I would like it to scroll instead.

Thanks!

Changing Speed

Wondering how to change the speed of the scroll between my presentation decks? Right now it's too slow.

I'm new to js, so it might be an obvious fix that I'm missing...?!

Autoscroll without the 'li' elements?

Hi,

Is there any way I can use the auto scroll function without showing all the ‘li’ elements at the top of page?

How can I remove the ‘li’ elements and still keep the auto scroll?

skrollr-menu navigation trick

Hi there,

I've found a way to use skrollr-menu together with skrollr-decks.

// Initialize skrollr-decks as usual.
skrollr.decks.init({
  segment: 'segment',
  nav: 'segment-navigation'
});

// Initialize skrollr-menu by passing skrollr.decks._instance as the first parameter.
skrollr.menu.init(skrollr.decks._instance, {/*other options*/});

Of course, it's not ideal because it uses private property of skrollr.decks object but it works.
Any other ways of doing this?

Thanks,
Konstantin

Footer after last deck

I have a footer container after last deck, but when I scroll to bottom where is footer information, the page autoscroll back to last deck. How can I prevent that?

not fullscreen

Hi! I love skrollr-decks, but i have one question. Is there a way I can make this not fullscreen? I just need the decks to be viewport height -100px. How can I achieve this? I have tried doing something like the following, but its not working!

var wndHeight = (window.innerHeight + 2) - 100,
deck, deckHeight, i;
for (i = segmentsList.length - 1; i > -1; i--) {
deck = segmentsList[i];
deck.style.height = wndHeight - 100;
deckHeight = deck.offsetHeight;
deck.style.height = (deckHeight < wndHeight ? wndHeight : deckHeight) + 'px';
}

Thank you!

Trouble repeating the setup of the first two slides

Hi,

Ive tried to setup multiple slides to reveal in the way that slide 2 appears from under slide 1. The problems Im seeing is that following your demo format, by the third slide when the users cursor passes over textual content in slide 3, scrolling behaviour seems to break down (the action of scrolling stops) I dont know if that makes sense. I will post the exact code tomorrow in case that helps to make any sense, I dont have it here.

I was wondering from the stand point of creating a stack of slides which all appear from under the previous (much like slide 1 to slide 2) what is the best format of commands to take?

I appreciate your hardwork extending skrollr to encompass the additional functionality offered by skrollr deck.

KF

Refresh

Call skrollr.refresh when page resized and loaded. Add to refresh method.

Change height of .skrollr-deck

Is there a way of changing the min-height of some of the decks, but not all?

I tried with CSS, but that didn't work out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.