Swipe last slide using swiper, but don't loop to first - javascript

I'm currently using iDangerous's Swiper plugin for jQuery. When it gets to the last slide, the only options seem to be to loop to the first slide (loop:true) or don't allow any swiping (loop:false). Does anyone know how to force it to allow swiping of the last slide off the screen, while not showing another slide?
Documentation:
http://www.idangero.us/swiper/api/#.VXWXU89VhBc
Maybe I've missed something?

Put a "blank" (opacity: 0 / visibility:hidden) slide at the end so you have the appearance of the last slide disappearing.

Related

Jquery UI slide - element sliding in at wrong position then abruptly shifting

I'm trying to have a div slide in at the same time as another one slides out, but when sliding in the div is completely invisible at the target location until the slide animation is complete. I'm not sure why this is happening. Does it have something to do with the iframe that is in the location at the time of the slide?
Here is an example of the issue. jsfiddle.net/eqck8vn2/1/ when you click the Twitter tab on the left, instead of smoothly sliding in, it scrolls in at a position right below the currently visible element (the iframe) before just appearing at the final position (even though there is a sliding animation applied to it without any specified positioning).
Thanks in advance for any help.

Sliding images with Previous/Next buttons in javascript using animate()

I have a slideshow of 4 banners with Prev and Next button. It works fine with the Prev button but not the Next button.My problem is Once I press the Next button, the images move not properly.
This is the result I need.=> The next image on the right slides from right to left when clicking Next button.Now it slides but sometimes some images slides back to the right.
Please help.Thank you
<http://jsfiddle.net/pktono/sr5nv6k9>
So, there was couple of issues to fix:
1- animation time was overriding the css command. To fix that, you should use setTimeout function where your aftermath code should reside inside of it.
2- When you navigate to right, you set the previous banner left property to -650px. If you decide to navigate to the left at this moment, you have a wrong left property which ruin the rules. The same thing can happen when you are navigating to left and want to switch to right. To fix this, you should change left property of the current banner to the right value before animating it.
See the working example here

bxSlider free slide on touch

I am using the bxslider in my responsive design. When I use the touch/swipe by my phone the slider slides correctly to the next two slides. This happens as well when you slide a bit too far.
I am wondering if it is possible to disable this function and to be able to slide free as you position the slides by yourself or a way to slide quickly to the last slide?

Scroll horizontal with fullPage.js, is it possible with the mouse wheel?

I am using fullPage.js for a one pager website. It works beautifully. It has support for scrolling through full page slides at the flick of the scroll wheel, and each slide can also contain a horizontal slideshow, normally triggered at that point by clicking one of the side arrows.
I want to force the user to scroll through that slideshow before they can progress down to the next slide. Does anyone know of a way to allow the slideshow to be triggered with the mouse wheel when scrolling down? Then when it hits the end of that slideshow it scrolls vertical again to the next slide?
You can do it with jquery.mousewheel like:
$('#fullpage').on('mousewheel', function(event) {
if (event.deltaY > 0){$.fn.fullpage.moveSlideRight();}
else{$.fn.fullpage.moveSlideLeft();}
});
https://github.com/jquery/jquery-mousewheel
Update 2016
Now fullPage.js provides the Scroll Horizontally extension for it.
What you want to accomplish is not that simple to implement in the plugin. Also, I would say forcing the user to follow a path is not consider as a good practice from the user experience point of view.
Also, what should happen once the user reach the next section and then scrolls up? Should he follow all the way back throw the slides of the previous section again in order to keep moving up ?
Anyway, if you want to accomplish it by your own, you would need first of all, to avoid the auto scrolling behavior when scrolling withing your slides (or the section slides for which you want to apply this).
And then, you would need to change the scrolling behavior to trigger the action to go to the next or to the previous slide by triggering the control arrows events depending on the scrolling direction.
Once the end of the slider is reached, you would need to add again the auto scrolling even.
It really doesn't sound simple if you want to do it by your own. You would need to recode the plugin.

Slider sliding back to the first image

I am using jQuery to slide through some images.
The slide animation is achieved using:
$('#slideInner').animate({ 'marginLeft' : slideWidth*(-currentPosition)});
This works fine, however when I reach the final image, and it loops back to the start, this animation will quickly slide through all of the previous elements to display the first (obviously because I am suddenly reducing the left margin).
What code would I need to write in order to allow the transition from last image back to first image to continue being a LEFT slide animation, displaying only the transition from last slide to first (without showing all other slides).
To make things a little more complex, I have left/right buttons allowing the user to move forward/backwards through the slider. These work fine, but it does mean that the solution cannot break these buttons.
Thank you.

Categories

Resources