Wilto / Dynamic-Carousel

A carousel plugin built for responsive layouts. There are many like it, but this one is mine.
matmarquis.com/carousel/
472 stars 112 forks source link

Fix autorotate #28

Closed allmarkedup closed 13 years ago

allmarkedup commented 13 years ago

Currently autorotate only works for the first transition, and then stops. This is because it works by triggering a click on the next/prev links, but it also cancels the autorotate in response to clicks, so after the first click the autorotate is canceled.

Quick solution is to use triggerHandler('click') as opposed to trigger('click') on the 'next' link, as I've done in this patch.

Wilto commented 13 years ago

Argh, my mistake—everything is event-driven now, so I’ve changed it over to fire a “nextprev” event rather than simulating a click on the controls (as it should have been from the outset). This should have been in the same commit as the inclusion of click-to-cancel for the autorotate.

allmarkedup commented 13 years ago

Perfect, a much nicer solution :-)