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

Assign plugin functionality to a certain part of the website #51

Open
riccardolardi opened this issue Nov 24, 2015 · 14 comments
Open

Assign plugin functionality to a certain part of the website #51

riccardolardi opened this issue Nov 24, 2015 · 14 comments

Comments

@riccardolardi
Copy link

Why not implement the plugin following the convention of $('#desired-container').scrollify({section: 'desired-section-element'}); so it can be assigned to only specific parts of the website? I have a one page layout but it is two-parted (50/50 left and right) and I only want the right part to have this functionality - when I apply it as it is now, only the hash changes but no scroll effect whatsoever...

@lukehaas
Copy link
Owner

lukehaas commented Dec 5, 2015

You might be able to achieve what you want by using the 'target' option.

@altmind
Copy link

altmind commented Mar 14, 2016

target is not documented, telling from source, it seems that it defines the (overflow:visible) element in which the conentent will scroll. which may be not what @alberto2000 want.

actually, i think i have the same necessity as @alberto2000 , i need to have half-of-screen of content on page and snappable blocks below, so snappable behavior starts from specific height. haven't found a solution yet.

@lukehaas
Copy link
Owner

@altmind yeah, when I made that comment I forgot that target was still a developmental feature.
This functionality won't be coming to Scrollify any time soon. It may be best to look for an alternative plugin for now.

@ri8ika
Copy link

ri8ika commented Jul 13, 2016

@alberto2000 You can manage them defining different section name. For left part define all section name to 'left-section' and for right part define all section name to 'right-section' and call scrollify for both.

@lukehaas
Copy link
Owner

@bini7a That won't work, Scrollify scrolls the window, not the document.

@ri8ika
Copy link

ri8ika commented Jul 14, 2016

@lukehaas I thought both part has scroll bar. Doesn't that work even?

Shouldn't it be updated to be more friendly for that?

@drewbaker
Copy link

+1 to allow containers other than window

@lukehaas
Copy link
Owner

lukehaas commented Sep 2, 2016

I'm happy for this feature to be added to Scrollify if anyone wants to contribute.

@riccardolardi
Copy link
Author

riccardolardi commented Sep 2, 2016

I'd be glad to contribute - @lukehaas if you could give me some indication on which parts may need refactoring or just a short crash course into the architecture of the plugin? From very first telling I'd just go and replace all references to $window with the new, configurable target element and go from there?

@lukehaas
Copy link
Owner

lukehaas commented Sep 2, 2016

@alberto2000 It could be as straight forward as that.
In Scrollify currently mouse scroll events are attached to the window and touch events are attached to the document, (can't remember why the difference now). The scroll animation is applied to "html,body".
Getting all those to point to a configurable reference is the best place to start.

@riccardolardi
Copy link
Author

On it, will make a PR asap

@riccardolardi
Copy link
Author

PR submitted #158

@lukehaas
Copy link
Owner

lukehaas commented Sep 3, 2016

@alberto2000 thanks I'll take a look soon.

@riccardolardi
Copy link
Author

@lukehaas what about #158 - also it'd be good if some could test it and report any feedback

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

5 participants