Create nav bar that appears after scrolling to second section [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I need to create something like that
What I understand is that no matter the window size, the background is resized to fit perfectly and once I scroll down the nav bar becomes visible and sticks to the top.
I believe I am going to need javascript (?) and obviously HTML and CSS.
Any tips, even to what to search will be greately appreciated.

Just google something like 'sticky navigation'. Here's the codepen I found (using jquery) and edited:
https://codepen.io/anon/pen/NABAxd.
The idea is very simple: you attach a handler to scroll event to check if user has scrolled down a certain amount. Based on that you apply or remove position:fixed to element. And you can find the amount of pixels scrolled from top via window.pageYOffset.
EDIT:
You can set height: 100vh to first section to cover whole browser window. I have edited the codepen.

Related

Alternative filmroll js [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there anyone who knows if there is a better alternative for the filmroll js library: http://straydogstudio.github.io/film_roll/ ? I use it because it's almost exactly what I'm looking for: It centers the active image in the middle of the screen and it works great with responsive designs.
The reason I'm looking for an alternative is because it contains a few bugs, which I discovered after one hour usage already:
It removes the cover from the beginning or end of the slider before it rotates. It would be better to first duplicate the image, so It won't display a white gap at the end of the slider while rotating. Anyways, I used a dirty fix by just loading the covers multiple times so it contains more images than what fits on the screen.
Every div contains a hardcoded width, which changes so now and then, because I use a bigger size for the active image. The problem is it doesn't always recover the width correctly of the parent div, so it will show white gaps between the images.
With touchSwipe enabled it is very very buggy.
I can't duplicate the slider multiple times with the same classname.
It truly is a great concept, only those bugs are quite bothering me. So before I start making adaptions, I'm just curious: Does anyone know a library which does exactly the same? Or almost the same.
You can try Iscroll as an alternative
http://cubiq.org/iscroll-5

jQuery image scrolling, selecting and lightbox-like-fx [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have a webpage in which I need to realize something that looks like the following sketch:
As you can see, there are basically two sections:
a side-block (preferably) on the right that serves as image-thumbnails scroller;
a contents-block on the left (in my draw) in which there are text parts and an image that is selected from the right side-scroller.
Side scrolling may be achieved by a browser sidebar or (very much preferably better) by apposite up/down buttons.
When clicking on a different image on the side-scroller that image get shown in place of the previous one.
Last thing, clicking the image selected shall make it show in full-size (not larger than browser window anyway) with a lightbox-like-effect.
Anyone know of a jQuery plugin that already provide all this?
Thank you very much.
Swiper (http://www.idangero.us/swiper/demos/) should help you with this, it covers most (if not all with a bit of a creative layout on your part) of the things you're looking for. It's got some very thorough documentation, for the light box behaviour you're looking for - I'd use one of the baked-in methods to create your own event handler.

How to implement a drag and swap effect in CSS and JS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
All:
Right now, say I have 4 DIV elements on the page, what I want to implement is drag a one DIV and move to other DIV then they can swap position just like IPHONE, when you hold the icon for a little while, all the icons turn into position edit mode, you can move icon around the screen and located to certain grid position and according icon can swap with it.
Could anyone show me an example for this?
Thanks
Jquery UI makes this trivial:
https://jqueryui.com/draggable/#sortable
http://jqueryui.com/sortable/#default
The link also shows an example of how to use it.

How do determine visible DOM elements within a scrolling DIV? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have a DIV that I want to scroll the contents of. As the user scrolls (using either a custom scrollbar or scroll up/down buttons), I need to know what DOM elements are visible within the scrollable DIV. I'd be happy to know even just one DOM element, as I can use that to walk the DOM and find a particular parent element that I'm looking for.
Are there any plugins that provide this kind of information in the scroll completion event, or can someone recommend a way of doing this?
Checkout Waypoints and/or jquery scrollspy. These do exactly the functionality you are looking for.

Jquery div slider [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have used quite a few jquery sliders like bxslider, wooslider etc. but they all slide images. is there any particular slider that can slide a div that contains some contents? if so, please give me some examples. and, what will happen if i try a div instead of an image with wooslider/bxslider?
In the past I have really only used Bootstrap libraries to do this. The template can be customized to how you want it, and it includes different ways to present text onto of every slide. If you want header tags, paragraphs or even a list. Controls can be changed, the Bootstrap controls that comes with Bootstrap aren't the best, they are kinda the basics. I recommend using Font Awesome and customizing the controls yourself. However you can not have the same text that is fixed when the slider is moving in the background. You must create a div outside the slider div.
http://getbootstrap.com/javascript/#carousel
Best example is on the mophie battery (mophie.com) website, using Bootstrap

Categories