iosscripts / iosslider

iosslider is a jQuery plugin which allows you to integrate a customizable, cross-browser content slider into your web presence. Designed for use as a content slider, website banner, or image gallery.
http://iosscripts.com/iosslider
432 stars 103 forks source link

iosSlider: Prevent from dragging last slide to the center #320

Closed vraguraman closed 10 years ago

vraguraman commented 10 years ago

Hi All, I am using iosSlider plugin. I want to restrict the last slide to the center by using mouse or dragging. How to implement this ?

Also, I want to retain the slider positions after the postback. iosSlider reloads again if any postback happens, I need to maintain all slides positions before the postback happens. How to do that ?

Thanks,

V. Raguraman.

marcwhitbread commented 10 years ago

I want to restrict the last slide to the center by using mouse or dragging. How to implement this ?

Center the last slide in the slider? You would use SnapSlideCenter: true for this.

iosSlider reloads again if any postback happens, I need to maintain all slides positions before the postback happens. How to do that ?

This is not built into the slider. You can store the current slide number in the hash onSlideChange and startAtSlide with this hash on page load.

vraguraman commented 10 years ago

Hi Marc Whitbread,

Thanks for your response.

For the 1 Question ,

Actually I want to Prevent / Restrict the last slide to move to the center by using dragging or mouse wheel. How to do that ? Even, if I try to drag the last slide to center, it should return back to the last place automatically. ie) The last slide should not move to the center by anyway.

For the 2 Question :

Yes, I am storing the current slide number and I call the GotoSlide method with the slide number. Now, the current slide is showing as 2nd slide (Active slide). This is not good. It should retain the same place before postback happens.

Can you understand the above problems ? Please let me know.

Thanks,

V. Raguraman.

On Fri, Mar 21, 2014 at 7:54 AM, Marc Whitbread notifications@github.comwrote:

I want to restrict the last slide to the center by using mouse or dragging. How to implement this ?

Center the last slide in the slider? You would use SnapSlideCenter: true for this.

iosSlider reloads again if any postback happens, I need to maintain all slides positions before the postback happens. How to do that ?

This is not built into the slider. You can store the current slide number in the hash onSlideChange and startAtSlide with this hash on page load.

Reply to this email directly or view it on GitHubhttps://github.com/iosscripts/iosslider/issues/320#issuecomment-38243348 .

marcwhitbread commented 10 years ago

Actually I want to Prevent / Restrict the last slide to move to the center by using dragging or mouse wheel. How to do that ?

So you want to remove the rubber banding at the end? Not possible unfortunately.

Yes, I am storing the current slide number and I call the GotoSlide method with the slide number. Now, the current slide is showing as 2nd slide (Active slide). This is not good. It should retain the same place before postback happens.

If you are looking to retain the precise offset of the slider through a page refresh, that wont be possible. Only the nearest slide offset can be used.