Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable initial activation #118

Closed
hammertimedk opened this issue Feb 25, 2014 · 5 comments
Closed

Disable initial activation #118

hammertimedk opened this issue Feb 25, 2014 · 5 comments

Comments

@hammertimedk
Copy link

I'd like no items to receive the "active" class when the plugin initializes. I tried setting startAt to false in the hopes that might do the trick.

Any hints on how to achieve this?

@hammertimedk
Copy link
Author

Welll... Obviously I could to a $el.removeClass("active") on doc load, but I feel a bit dirty doing that, if there is a way to tell Sly not to activate any elements on init .... :O)

@darsain
Copy link
Owner

darsain commented Feb 25, 2014

Not supported atm :( I know I had some reasons for it, but dunno what they were. It is on a to-do list for next rewrite though.

@hammertimedk
Copy link
Author

Ok thanks - I've done my "fix", and the side-effect is that the first element is still active internally in Sly, so when the user clicks it, it does not get the active class reapplied.

I might do a pull request on this on, or just hack the js depending on how much time I have on this project ;)

Thanks for a great plugin BTW - It will be used for the front slider on a major european film talent agency website.

@darsain
Copy link
Owner

darsain commented Feb 25, 2014

Don't bother. There are a lot of issues with current Sly. It needs a big rewrite which will change a lot of things, so time spent on current version would be time wasted. I remember trying to change this particular thing a few months back and dealing with side effects was too annoying so I just decided to wait with this for a rewrite. Can't give you ETA though. Priority is on paying the bills right now :/

I might patch this if there would be a bounty attached though :)

@darsain
Copy link
Owner

darsain commented Mar 5, 2015

So commit above implements this. It should work, but I'd actually be surprised if there were no side effects. If some pop up, feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants