Click, Scroll to and fade in - scroll

I need your help with a javascript.
The status quo:
I am making a website, that kind of functions like a slide show:
Each slide consists of a header, an image and a little text. Underneath the text comes a little arrow that points down. When you click it you should scroll down to the next slide. When it scrolls down it should fade in the next header.
You can find what I've got so far here:
http://jsfiddle.net/singue/mjvky
<script type="text/javascript">
The problem:
Whenever the arrow is clicked it sometimes does and sometimes doesn't scroll to the desired div. It seems pretty random.
The other problem is only with the first arrow: I have is when i click it, the next header-, image- and text-div hide but then the third slide slides up, right after the first slide. It then scrolls from the first slide to the second one, but you will see the third one while it scrolls. Why is this happening when the first arrow is being clicked and only then?
Do you have an idea how to make it work?
Thank you very much!
Yves

Related

Gatsby anchor link / scrollTo hiding the page above the displayed element

I am using Gatsby for the first time and I have started with the Cara starter template.
I have added a link to the hero that would scroll to the next sections (projects) when clicked.
The link does take you to the next section, however the scroll bar remains scrolled all the way to the top of the bar. Meaning that you cannot scroll back up the page. (Strangely now when you scroll to the bottom of the page, the footer is not aligned with the bottom of the page, but you can now scroll all the way back to the top of the page again.)
I tried using various techniques; a standard anchor tag referencing an id, using gatsby-plugin-smoothscroll to scrollTo() the element, and all have this same end result.
I'm not sure what is causing this behaviour, but maybe it is something to do with the layout or some conflicting scrolling or offsetting. I would appreciate any help to get me back on track.
I have hosted what I have done so far, so that you can see the issue I am having:
https://portfoliositemain36740.gatsbyjs.io/

Fullpage.js - Anchor point on mobile not going back to top of the section when scrolled through

I have this website -> https://life-5.webflow.io/ used with Fullpage.js.
If you open the website on mobile and try to tap one of the links in menu, everything goes fine.
For example "Výhody" are made from 5 tabs.. If you tap the link on top of the page you goes to 1st one, but if you scroll through the section and taps the "Výhody" once again, you get scrolled only to 5th tap and not to the top.
Any help how to fix this and makes the link always goes to the top of the section?
Thanks a lot for any help!
Check out the bigSectionsDestination option.
From the the fullpage.js documentation
bigSectionsDestination: (default null) Defines how to scroll to a section which size is bigger than the viewport. By default fullPage.js scrolls to the top if you come from a section above the destination one and to the bottom if you come from a section below the destination one. Possible values are top, bottom, null.

HOw to get rid of vertical "overflow:hidden" in Slick Slider

All. I am emboding the Online Store PSD design to HTML/CSS. Here is link.
There is an items slider in items page. Every item has configuration icons in the bottom of the it. When you hover on the item, second row of icons appear. Every configuration icon has its tooltip on hover. Let me describe the problem. Now because of Slick slider 'overflow:hidden' property on 'slick-list' block, the second row of icon is not visible fully. BEsides, tooltips are also being trimmed. If If I delete 'overflow:hidden', this problems disappear. But another problem appears. That is, now all slides are visible horizontally which are out of bound. If you visit the site, you notice in the bottom of the page 2 sliders. The second one has no 'overflow:hidden'. Therefore, everything is visible. But it is not good. If users monitor has high density, it looks very ugly. The first slider is by default. It has 'overflow-hidden' property , therefore everything out of bound is trimmed. I need only get rid of vertical 'overflow:hidden'. Is this possible? Thanks much, in advance.
enter image description here

I can't disable scrolling (NOTHING WORKS, TRIED LOTS)

Here is a facetious cat site..
http://jsfiddle.net/Spunkgraffiti/ruxLs/embedded/result/
Go ahead and click on some blank space, stay clicked (mousedown), and drag your mouse down to the bottom of the window, it scroll's down! Every time!
The issue is that no matter what I do I can't disable scrolling when you click and drag to the bottom of the screen..
I have disabled the scroll wheels, tried to disable highlighting (cause I thought perhaps it was not "scrolling" per se but actually highlighting more and more content moving the page down), and tried a css disable of scrolling. Nothing works..
Overflow hidden doesn't help here either :/
How do I stop the scroll caused by clicking and dragging your mouse down to the bottom of the window (already fully expanded window).
I'm trying to write up a drag and drop bar at the bottom of the screen, but every time I drag a picture and try to drop it, the whole page moves.. I just want the whole page not to move when I begin to drag a picture..
Thank you everyone who takes the time to read this!
$(function() {
$(document).scroll(function() {
$(document).scrollTop(0);
});
});
See http://jsfiddle.net/ffy2x/5/
It is rock solid (doesn't scroll at all) on recent (as of this post's date) versions of Firefox, Chrome and WebKit in Qt. Internet Explorer scrolls a bit then bounces back. If it's for an embedded application using one of the first three, then this isn't a problem.

dojo Show/Hide One ContentPane While Another ContentPane Is Liquid

I've been struggling for weeks trying to crack this nut so I'm not sure if it's impossible, or if it's my lack of coding chops... or both. I'm not a programmer and I'm a newbie to Dojo Toolkit.
I have a site using the BorderContainer layout. I'm trying to create an effect where I can use a button to open and close a dropdown type box that will contain controls. I need this dropdown to be hidden on page load, and then open when you click the button.
My problem is that when I open the dropdown, it pushes the content pane below it off the bottom of the browser window. I need the lower ContentPane to stay fit within the remaining space of the browser window when the dropdown opens. Additionally, I want the dropdown to sit outside of the scrollable container for the content below it, which is why I have it set up to sit outside a nested BorderContainer below it.
I've created a simplified version of the code to demonstrate my challenge (see link below). If you load the page you can see the center ContentPane scrolls the content. But, if you then click on the button, a dropdown div expands above the content. Then when you scroll, you'll notice that you can't see the full pane because it's in no-man's-land below the bottom of the browser window. I assume that because the div is set to display:none on load, it's size is not accounted for on page load. Then, when you open it by pressing the button, it's size is additive and the pane below doesn't know how to resize or account for the new element.
I've tried using the visibility attribute, but that leaves a gap for the div when it's still closed. I've tinkered with some code that controls the height that shows promise, but each of my dropdown boxes will be different sizes so I'd prefer that the height be set to "auto" rather than a specified pixel size.
Does anyone have any idea how I can accomplish this so that the lower pane will fit in the space without pushing off the screen?
Here's a sample of the page:
http://equium.com/scaffold.html
(I had some problems trying to insert the full HTML page here as a code sample so if that's a preferable way to handle it, and someone can let me know the best way to embed all of that code, I'd appreciate it.)
Thanks is advance, I'd really apprecaite anyone's feedback.
You might want to take a look at dojox.layout.ExpandoPane (though be warned I think it has only worked properly for top and left regions for a while).
Also, I'd suggest simplifying/altering your layout a bit. See example here:
http://jsfiddle.net/taFzv/
(It'd probably need some tweaking to get exactly what you want.)
The real issue you're having is probably that the BorderContainer has no idea that parts of the view resized. ExpandoPane takes care of that by telling the BorderContainer to re-layout after its animation completes.
It works under IE8.0. When dropdown box open, just keep pressing mouse from page and drag to bottom, you could see the content was pushed to out of page. It looks the browser could not detect it and could not add it to "scroll bar" account.
I would suggest taking out all BorderContainers except your top level one, the one with mainPage as the id.
Place your {stuff here} div into the mainPage BorderContainer, after the ContentPane with the Close/Open button. Make sure you make it dojotype dijit.layout.ContentPane, set up layoutpriority, and set region to top. Set the height to 0/x when clicking the Open/Close button, instead of setting display.
Try your page again. If that doesn't fix it, you probably need, a call to layout, resize, or both to indicate to the BorderContainer that it needs to evaluate all its children and size the "center" pane properly. Something like dijit.byId("mainPage").layout(); Do this any time someone presses the Close/Open button, after you have changed the height of any BorderContainer children.
Maybe the dijit.form.DropDownButton would fit your needs. When click the button a tooltip is displayed that can be filled with any content you want. Just as you specified, the dropdown tooltip is only displayed when you click the button, and it doesn't mess with the underlying layout at all. The tooltip sits "on top" of the page.

Resources