Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with any scrollable div #65

Open
mparker11 opened this issue May 7, 2014 · 14 comments
Open

Use with any scrollable div #65

mparker11 opened this issue May 7, 2014 · 14 comments
Assignees

Comments

@mparker11
Copy link

It seems like the code only takes into account a scrollable window. Could we use this on any scrollable div container? Like focusing only on elements inside <div id="myDiv"></div> and make them animate?

@attilaolah
Copy link
Collaborator

I guess we could, with any block-level element that has overflow: scroll. It shouldn't be very hard to implement, although I'm not very excited about it :)

@attilaolah attilaolah added this to the 1.0 milestone Jul 8, 2014
@attilaolah attilaolah self-assigned this Jul 8, 2014
@maryreigns
Copy link

Hi! Is this feature already supported?

@attilaolah
Copy link
Collaborator

Not yet, sorry.

@dangnelson
Copy link

+1 for this...

@pojka
Copy link

pojka commented Mar 29, 2015

+1

@pojka
Copy link

pojka commented Mar 29, 2015

Found a sneaky workaround based upon #162 (comment)

In combination with https://github.com/zeusdeux/isInViewport the suggestion in that comment can be slightly modified to enable scrollable divs to operate in the same manner as a scrollable window (at least for basic config)

Install the plugin, or roll your own inViewport element detection mechanism, then do something like this:

var scrollable = $('#your-scrollable-div');
scrollable.on('scroll.wow', function(){
    scrollable.find('.wow:not(.animated):in-viewport').removeAttr('style').addClass('animated');
});

Works perfect for animations contained in a scrollable div for me

@Simoneth
Copy link

Simoneth commented Apr 8, 2015

I tried that solution but why I got this error from console? the "function is not defined" at 'scroll.wow', function() line

@pojka
Copy link

pojka commented Apr 9, 2015

@drhouse7 do you have both jQuery and the isInViewport plugin installed? Also did you change 'your-scrollable-div' to match the id of your scrolling div?

@Simoneth
Copy link

Simoneth commented Apr 9, 2015

@pojka Finally it works! Instead of add the script to the header, I inserted it directly in my view and now wow.js works on my scrollable section. You are awesome Pojka, thanks for this workaround...the only problem now is that each single row of items are displayed at once when in viewport, there is no delay (from left to right with this code data-wow-delay="<?php echo $delay; ?>s").

@roganoalien
Copy link

My man @pojka you rock. You save me big time on doing a lot of research and changing everything. I salute you almost 1 year after your workaround.

@zodern
Copy link

zodern commented Apr 6, 2016

It seems to be supported now:

  new WOW({
    scrollContainer: '.scroll'
  }).init();

@PierreGallet
Copy link

ScrollContainer is not working with md-content from angular. things remains hidden...

@smappdooda
Copy link

Does this actually officially work now or still no?

new WOW({ scrollContainer: '.scroll' }).init();

I have tried it and can't get it to work. I have a center column div set to scroll and I cannot for the life of me get the animations to work (unless I stretch the bottom of the browser window)

@mehulsharma01
Copy link

mehulsharma01 commented Oct 5, 2023

If you want to add wow animation in scrollOverflow div of fullpage.js then you can try onLeave or afterLoad event

Example:

onLeave:function(index){ // index: get slide index if(index.index == 1){ var scrollable = $(".about_container .fp-overflow"); // your custom class or id scrollable.find('.wow:not(.animated)').removeAttr('style').addClass('animated'); scrollable.find('.wow.animated').css({'animation-duration': '1.5s'}) } };

Thank me later :)

Repository owner deleted a comment from veraLX Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests