Codeinwp / carouFredSel-jQuery

A circular, responsive carousel plugin built using the jQuery.
http://caroufredsel.dev7studios.com
Other
318 stars 476 forks source link

progress bar wider than 100% with only one item #15

Open rolfmeijer opened 10 years ago

rolfmeijer commented 10 years ago

When a carousel is created with only one item the progress bar gets wider than 100% because the perc variable, used in the progress bar css width declaration, keeps being calculated. This also happens on the last item of a carousel that is not circular (and/or infinite).

A workaround is relatively easy, override the style attribute from the progress bar in css (with the !important as it is defined as a style attribute on the HTML-element).

But it would be nice if the calculation just stops as it is not necessary anymore.