scrollbar button js not working - javascript

I'm creating photo slides using simple scrollbar method but also adding js for left and right button to make it flexible to view slide horizontally.
Scrollbar is working just perfect but the bellow buttons doesn't seem to show any action. Can someone please guide me what's wrong in the coding? TIA
Here's what I am talking about: [https://jsfiddle.net/sh27dyx3/1/]

scrollbar doesn't set $("#slide").left. jQuery's offset().left is just clever enough to tell you what is its offset. you need to update the parent's scrollbal scrollLeft property
https://jsfiddle.net/txth2usk/
by the way, i guess you could determine what image is at the leftmost position and then instead of -100 and +100 you could scroll to the next/previous sibling's offset, would be much cooler

Related

How to create zoom on scroll effect through section or div into next one?

I'm looking for zoom-in effect on scroll like this one: click here to check
You can see it in the section with "REFORM CO" title.
Could anyone explain me where should I start to get more knowledge about that stuff?
Is it create with translate3D or translateZ?
Should I use overlay title as PNG with transparent title, or somehow create div with transparent text over the next div?
And how to start zooming only when you are in "REFORM CO" section, and not from the beginning?
If you can't tell me exactly what to do with it, please just give me any advice. Thanks!
It is actually scale property that's working here and looks like a zoomed element.
This is how it works Example
Just add an onscroll() instead of onclick() for scaling the element.
And to detect the percentage wise scroll of your page from top PageScrolling
And in this way by detecting when scrolled and element appears you can trigger the js for transforming the element and it will appear like zoomed.

Left and right navigation in horizontal listview in winjs

How do we implement like Windows store does? Left and right navigational arrows with animations for 'Listview'? I tried, 'Flipview', 'HubControl', and also, when ever I try 'ensureVisible' on 'Listview', there are no animations in 'Listview'. How do I achieve animating content while navigating with left and right arrows?
Sorry, misunderstood your question before. I think you'll have to use a ListView and draw your own buttons on a layer above it.
When you push a button, you can get the current scroll position of the ListView using the scrollPosition property. Get the current width of the ListView and add to or subtract that from the scrollPosition. However, this does not animate the scrolling automatically.
You can also use the ensureVisible() method to scroll to a particular item.
To get the ListView to animate when jumping to a new position, I think you're going to have to use WinJS.UI.executeAnimation to do it.
https://msdn.microsoft.com/en-us/library/windows/apps/hh779762.aspx
I've done it before, but I honestly can't remember exactly how it works. I know you'll have to setup some rules for how the animation behaves in CSS and then run it asynchronously in javascript.
WinJS.UI.Pivot has arrows with ListViews in the playground.
http://winjs.azurewebsites.net/#pivot
So does WinJS.UI.FlipView
http://winjs.azurewebsites.net/#flipview
But maybe you want the WinJS.UI.NavBar
http://winjs.azurewebsites.net/#navbar

Smooth scroll div horizontally by a pixel amount, no scrollbars

I've got 10 floating DIVs in a container DIV that I want to be able to scroll through using a button.
I'd like to use left/right buttons to make the container DIV scroll 300px horizontally to display the next floating DIV.
I'd like the width of the container to appear as 100% of the window, and I'd also like there to be no horizontal scroll-bar on the bottom. If it could scroll sideways that'd be great but it's not a must have.
Here's what I've got:
http://jsfiddle.net/696je/
I'm just looking for a function and the way to activate the function for left/right buttons.
I've tried Google for hours, I've tried Flesler's ScrollTo but I haven't had any luck, it might be something do to with the way I've got the width set up, anyway, thanks for your help.
It is possible to do with mix of CSS (display:inline-block and white-space:nowrap) and jQuery (scrollLeft)
here is a jsFiddle implementation with minimum possible wrappers.
I was a little confused by your code you posted in the jsFiddle. You said you wanted no horizontal scroll bars, yet your stuff was set up that way. I went with the horizontal scroll bar since that is what you were going with in your code.
I made a working function here jsFiddle. To get it to work in the frame you need to put focus in the "Result" window (just click anywhere), then use your left and right arrows.
I must give the javascript for keypress credit from this post

How to make a horizontal scrollbar with mouseover effects?

Helo to all, i have been searching all over the web for some jquery or javascript tutorial or plugin for a horizontal scrollbar and i have found many of plugin asnd tutorial but not the one i want.
Now im using tinyscroll and i have found it has alot of bugs, can somebody help me with the next effects.
Mouseover: At mouseover at the right or left it scrolls by itself.
Shadow at hiding: When a image hides at the left or right a shadow effect that gives a "it got in the bottom of this layer" effect.
Scrollbar: simple bar that has a 80% opacity
mouse scroll: that mouse scroll can be used with it.
I need something like the movie scroller in this page:
Cuevana.tv
And i know html and css but css -webkit styling can't do this effects.
I really dont have any codes to start with, please help.
Try this one.
It has the horizontal scrollbar and the mouse scroll works.
With css you could get it to look exactly like the one in the link you posted. (positioning the left and right carets up by the image container and etc...)
I'm quoting a good SOF answer here: jquery horizontal scroll
Try hoverscroll jQuery plug-in - http://rascarlito.free.fr/hoverscroll/
Also try Smooth Div Scroll - http://www.smoothdivscroll.com/demo.html

gallery/div slide based on cursor position

I'm looking for a solution to animate a horizontal gallery (div) based on cursor's proximity to the left or right of the window. The center of the window will do nothing, but as you begin to creep left, the gallery slides right, and visa versa. Very common thing to do, but I want to accomplish this with javascript/jquery. If someone could just get me on the right track I would appreciate it.
(Edit) For a newer and improved example go to this SO question:
Horizontal scroll on mouseMove - wide div in smaller div with overflow:hidden (Can't get the math to work)
I created a mousemove gallery.
Hope this will help.
JSFIDDLE DEMO: MOUSEMOVE GALLERY
Just set into the css the desired width and height of the gallery container. Fill the gallery with images and enjoy! :)The code is simplyfied and commented to help anyone upgrade it.
bunch of examples and plugins;
http://www.dynamicwp.net/articles-and-tutorials/top-20-jquery-slideshow-and-image-gallery-tutorials/
http://plugins.jquery.com/plugin-tags/slideshow

Categories

Resources