Owl carousel autoplay не работает

Содержание
  1. How to slider autoplay start and stop on mousehover and mouseleave? #1471
  2. Comments
  3. presslayouts commented Jul 4, 2016 •
  4. NPanayotov commented Jul 11, 2016 •
  5. presslayouts commented Jul 14, 2016
  6. NPanayotov commented Jul 14, 2016 •
  7. presslayouts commented Jul 14, 2016
  8. NPanayotov commented Jul 14, 2016
  9. presslayouts commented Jul 14, 2016
  10. NPanayotov commented Jul 14, 2016
  11. presslayouts commented Jul 15, 2016
  12. Vilz commented Aug 12, 2016 •
  13. bardachev commented Aug 14, 2016
  14. presslayouts commented Aug 16, 2016 •
  15. Vilz commented Aug 22, 2016 •
  16. presslayouts commented Aug 23, 2016
  17. Can’t stop carousel in autoplay mode after ‘to.owl.carousel’ trigger #144
  18. Comments
  19. sferrara commented Jun 11, 2014
  20. witrin commented Jun 16, 2014
  21. nford commented Jun 16, 2014
  22. witrin commented Jun 16, 2014
  23. witrin commented Jul 27, 2014
  24. mufaddalmw commented Nov 27, 2014
  25. lmartins commented Feb 3, 2015
  26. alteredstudio commented Feb 3, 2015
  27. lmartins commented Feb 6, 2015
  28. ghost commented Mar 31, 2015
  29. ghost commented Mar 31, 2015
  30. Owl carousel autoplay не работает
  31. items
  32. margin
  33. center
  34. mouseDrag
  35. touchDrag
  36. pullDrag
  37. freeDrag
  38. stagePadding
  39. merge
  40. mergeFit
  41. autoWidth
  42. startPosition
  43. URLhashListener
  44. rewind
  45. navText
  46. navElement
  47. slideBy
  48. slideTransition
  49. dotsEach
  50. dotsData
  51. lazyLoad
  52. lazyLoadEager
  53. autoplay
  54. autoplayTimeout
  55. autoplayHoverPause
  56. smartSpeed
  57. fluidSpeed
  58. autoplaySpeed
  59. navSpeed
  60. dotsSpeed
  61. dragEndSpeed
  62. callbacks
  63. responsive
  64. responsiveRefreshRate
  65. responsiveBaseElement
  66. video
  67. videoHeight
  68. videoWidth
  69. animateOut
  70. animateIn
  71. fallbackEasing
  72. nestedItemSelector
  73. itemElement
  74. stageElement
  75. navContainer
  76. dotsContainer

How to slider autoplay start and stop on mousehover and mouseleave? #1471

Comments

presslayouts commented Jul 4, 2016 •

List of products with slider are available on same slider class, but when i mouse hove in any one li product, then effect only on mouse hover li play and stop slider.

Only mouse hover li slider play and stop.

Slider js code bellow:

I have use above code but it not working.
Please help me how do it?

The text was updated successfully, but these errors were encountered:

NPanayotov commented Jul 11, 2016 •

owl.owlCarousel( <
loop:true,
smartSpeed:450,
responsiveClass: true,
autoplayHoverPause: true, // Stops autoplay
responsiveRefreshRate : 10,
items:1,
>);

autoplayHoverPause
Type: Boolean
Default: false

Pause on mouse hover.

presslayouts commented Jul 14, 2016

Thank you for reply,

By default autoplay is stop but when i mouse hover on li then autoplay star and when mouse on leave li then autopay is stop.

When autoplayHoverPause is working only stop autoplay slider.

Please you can help in my requirement.

NPanayotov commented Jul 14, 2016 •

var owl = $(«.product-slider»).addClass(‘owl-carousel);
owl.owlCarousel( <
loop:true,
smartSpeed:450,
responsiveClass: true,
responsiveRefreshRate : 10,
items:1,
>);

$(‘.product-slider li’).on(‘mouseenter’,function(e) <
$(this).closest(‘.owl-carousel’).trigger(‘play.owl.autoplay’);
>)

$(‘.product-slider li’).on(‘mouseleave’,function(e) <
$(this).closest(‘.owl-carousel’).trigger(‘stop.owl.autoplay’);
>)

presslayouts commented Jul 14, 2016

But it not working and i have already added class owl-carousel in html structure.

We will use owl carousel js version is Owl Carousel v2.1.6.

what’s a problem? or I will some misunderstanding.

We have use bellow code and it working autopay slider, but only first slider slide is pay not second slide pay and after stop. not working continue end slide autopay.

Please any help me?

NPanayotov commented Jul 14, 2016

Try using older version of the plugin. It seems that since the new owner started changing things some of the functions got broken.

Читайте также:  Bloody w60 max как настроить подсветку

presslayouts commented Jul 14, 2016

Thank you for your good and fast reply,

Please you can tell me which older version use, then your code works fine

Thank.
On 14-Jul-2016 8:31 pm, «NPanayotov» notifications@github.com wrote:

Try using older version of the plugin. It seems that since the new owner
started changing things some of the functions got broken.

NPanayotov commented Jul 14, 2016

Поздрави,
Николай Панайотов

Thank you for your good and fast reply,

Please you can tell me which older version use, then your code works fine

Thank.
On 14-Jul-2016 8:31 pm, «NPanayotov» notifications@github.com wrote:

Try using older version of the plugin. It seems that since the new owner
started changing things some of the functions got broken.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

presslayouts commented Jul 15, 2016

I have tried in version 2.0.0 but it not working.

I have attached bellow my example .zip file, please you can check and
resolve issue and after send me this example.

thank in advance.

On Thu, Jul 14, 2016 at 9:33 PM, NPanayotov notifications@github.com
wrote:

Поздрави,
Николай Панайотов

Thank you for your good and fast reply,

Please you can tell me which older version use, then your code works fine

Thank.
On 14-Jul-2016 8:31 pm, «NPanayotov» notifications@github.com wrote:

Try using older version of the plugin. It seems that since the new
owner
started changing things some of the functions got broken.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub

Vilz commented Aug 12, 2016 •

bardachev commented Aug 14, 2016

Confirm that starting autoplay after mouse leave is buggy. It sometimes starts, sometimes don’t. When I then swipe to a next slide by hand — autoplay starts again.
I have 1 item on a page.

presslayouts commented Aug 16, 2016 •

Than you for your reply and it working fine but one issue is remaining.

I have use nested carousal, it means carousal inside carousal, And will use above code in parent inside one slide inside child carousal. When i mouse hover on any one parent slide then move both slider parent and child.

See bellow html code:

Please you can help me, only move child slider not parent slider move.

Thank you in advance .

Vilz commented Aug 22, 2016 •

Check that the variables used in each, do not coincide with the variables of parental carousel.

Something like this

  • start fix autoplay on hover straight

I would need to implement a similar behavior after a while, so I’ll check in my project and write, if need be

presslayouts commented Aug 23, 2016

Thank you for help and reply.

mainTechnologiesCarousal is undefined variable.

How can use mainTechnologiesCarousal variable.

We are waiting for your reply.
On 22-Aug-2016 6:04 am, «Vilz» notifications@github.com wrote:

Check that the variables used in each, do not coincide with the variables
of parental carousel.

Читайте также:  Htc one как настроить время

Something like this

$(‘.product-slider.owl-carousel’).each(function() <
var mainPromoCarousel = $(this);
var interval;
mainPromoCarousel.owlCarousel( <
items: 1,
nav: false,
navText: [», »],
slideBy: 1,
dots: true,
loop:true
>);
function nextPress(obj) <
obj.trigger(‘next.owl.carousel’);
>;
$(this).hover(
function() <
nextPress(mainTechnologiesCarousel);
interval = setInterval(function() <
nextPress(mainTechnologiesCarousel);
>, 1500);
>,
function() <
clearInterval(interval);
>
);
>);

I would need to implement a similar behavior after a while, so I’ll check
in my project and write, if need be

Источник

Comments

sferrara commented Jun 11, 2014

Hello,
I’ve this 2 rows in my code:
owl.trigger(‘stop.owl.autoplay’);
owl.trigger(‘to.owl.carousel’,[index],[0]);

but the carousel doesn’t stop. If I remove the first row the stop works.

Can you help me?

Best Regards
Stefano

The text was updated successfully, but these errors were encountered:

witrin commented Jun 16, 2014

@sferrara Could you provide a link to an example?

nford commented Jun 16, 2014

I’ll just jump in here. I couldn’t get the event above, or autoplay.stop.owl to work. Added to codepen. http://codepen.io/nford/pen/Jefcr

witrin commented Jun 16, 2014

witrin commented Jul 27, 2014

mufaddalmw commented Nov 27, 2014

@witrin Demo provided by you above doesn’t seem to be working. Can you update?

lmartins commented Feb 3, 2015

Have anyone found out a solution for this, can’t make autoplay stop either.

alteredstudio commented Feb 3, 2015

I tried this. Should work according to the Owl 2.0 docs. It never stops on hover, or autoplay.stop.owl
Any updates on bug fixes, or work arounds? Thanks

$(‘.owl-carousel’).owlCarousel( <
loop:true,
nav:true,
items:1,
margin:0,
autoplay:true,
autoplayHoverPause:true,
>);

$(‘.owl-item, .owl-prev, .owl-next, .owl-dot span’).on(‘click’,function() <
$(‘.owl-carousel’).trigger(‘autoplay.stop.owl’)
>)

lmartins commented Feb 6, 2015

Now that OwlCarousel changed hand, maybe we will see a fix soon. Let’s hope.

ghost commented Mar 31, 2015

Is there any more news on this? I’ve come across this issue now and would love for it to stop on request. Has any progress been made?

ghost commented Mar 31, 2015

I’ve taken a look at the code and it seems you’re just missing one line of code. The autoplay handlers has this for the stop event:

Looking at the stop() function, it is only set to this:

This only clears the interval but doesn’t stop the autoplay. Adding in a line to set the option fixes this:

Note this may need a similar fix if you want to start autoplay as well but I haven’t tested that. Hope this helps with the fix and helps anyone who needs this functionality.

Источник

List including all options from built-in plugins video, lazyload, autoheight and animate.

items

Type: Number
Default: 3

The number of items you want to see on the screen.

margin

Type: Number
Default: 0

margin-right(px) on item.

Type: Boolean
Default: false

Infinity loop. Duplicate last and first items to get loop illusion.

center

Type: Boolean
Default: false

Center item. Works well with even an odd number of items.

mouseDrag

Type: Boolean
Default: true

Mouse drag enabled.

touchDrag

Type: Boolean
Default: true

Touch drag enabled.

pullDrag

Type: Boolean
Default: true

Stage pull to edge.

freeDrag

Type: Boolean
Default: false

Читайте также:  Как настроить киви валет

Item pull to edge.

stagePadding

Type: Number
Default: 0

Padding left and right on stage (can see neighbours).

merge

Type: Boolean
Default: false

Merge items. Looking for data-merge=’‘ inside item..

mergeFit

Type: Boolean
Default: true

Fit merged items if screen is smaller than items value.

autoWidth

Type: Boolean
Default: false

Set non grid content. Try using width style on divs.

startPosition

Type: Number/String
Default: 0

Start position or URL Hash string like ‘#id’.

URLhashListener

Type: Boolean
Default: false

Listen to url hash changes. data-hash on items is required.

Type: Boolean
Default: false

Show next/prev buttons.

rewind

Type: Boolean
Default: true

Go backwards when the boundary has reached.

Type: Array
Default: [‘next’,’prev’]

Type: String
Default: div

DOM element type for a single directional navigation link.

slideBy

Type: Number/String
Default: 1

Navigation slide by x. ‘page’ string can be set to slide by page.

slideTransition

Type: String
Default: «

You can define the transition for the stage you want to use eg. linear.

Type: Boolean
Default: true

Show dots navigation.

dotsEach

Type: Number/Boolean
Default: false

Show dots each x item.

dotsData

Type: Boolean
Default: false

Used by data-dot content.

lazyLoad

Type: Boolean
Default: false

Lazy load images. data-src and data-src-retina for highres. Also load images into background inline style if element is not

lazyLoadEager

Type: Number
Default: 0

Eagerly pre-loads images to the right (and left when loop is enabled) based on how many items you want to preload.

autoplay

Type: Boolean
Default: false

autoplayTimeout

Type: Number
Default: 5000

Autoplay interval timeout.

autoplayHoverPause

Type: Boolean
Default: false

Pause on mouse hover.

smartSpeed

Type: Number
Default: 250

Speed Calculate. More info to come..

fluidSpeed

Type: Boolean
Default: Number

Speed Calculate. More info to come..

autoplaySpeed

Type: Number/Boolean
Default: false

Type: Number/Boolean
Default: false

dotsSpeed

Type: Boolean
Default: Number/Boolean

dragEndSpeed

Type: Number/Boolean
Default: false

callbacks

Type: Boolean
Default: true

Enable callback events.

responsive

Type: Object
Default: empty object

Object containing responsive options. Can be set to false to remove responsive capabilities.

responsiveRefreshRate

Type: Number
Default: 200

Responsive refresh rate.

responsiveBaseElement

Type: DOM element
Default: window

Set on any DOM element. If you care about non responsive browser (like ie8) then use it on main wrapper. This will prevent from crazy resizing.

video

Type: Boolean
Default: false

Enable fetching YouTube/Vimeo/Vzaar videos.

videoHeight

Type: Number/Boolean
Default: false

Set height for videos.

videoWidth

Type: Number/Boolean
Default: false

Set width for videos.

animateOut

Type: String/Boolean
Default: false

Class for CSS3 animation out.

animateIn

Type: String/Boolean
Default: false

Class for CSS3 animation in.

fallbackEasing

Type: String
Default: swing

Easing for CSS2 $.animate.

Type: Function
Default: false

Callback to retrieve basic information (current item/pages/widths). Info function second parameter is Owl DOM object reference.

nestedItemSelector

Type: String/Class
Default: false

Use it if owl items are deep nested inside some generated content. E.g ‘youritem’. Dont use dot before class name.

itemElement

Type: String
Default: div

DOM element type for owl-item.

stageElement

Type: String
Default: div

DOM element type for owl-stage.

Type: String/Class/ID/Boolean
Default: false

Set your own container for nav.

dotsContainer

Type: String/Class/ID/Boolean
Default: false

Источник

Оцените статью