jquerytools/jquerytools — Issue #623: Prev becomes enabled even though there is only one image
Author: mb-dev
Created: 2012-01-17 22:55:43+00:00
State: open

Issue found:
Prev becomes enabled even though there is only one image

Steps:
1) Having scrollable images with only one image and next/prev links.
2) When loading the page the prev/next are disabled properly
3) Clicking the disabled next

Expected Behavior:
Nothing to happen

Actual Behavior:
the seekTo runs and prev is no longer disabled.

Reason:
if (!conf.circular && i < 0 || i > self.getSize() || i < -1) { return self; } check is not enough
prev.toggleClass(conf.disabledClass, i <= 0); makes the link visible (i==1)