Closed adrienrn closed 9 years ago
Is there any progress about this bug?
@huseyinemanet For now, the fix explained in my first post has been working for us.
Sorry about the crazy delay, this was fixed back in https://github.com/simontabor/jquery-toggles/commit/33231f839805122d90fa40f476e2833359152594 though
On initialization of the toggle (when page loads), the toggle is initialized to the right value but it doesn't add the class
active
to the.toggle-on
div.Regardless of the
on
options passed to the .toggles() function, the.active
class is always on the.toggle-off
.Reading the code, I think that's because the .toggle function is not called on init. A solution would be to set the right class at the end of the constructor based on the current active state: