-
Notifications
You must be signed in to change notification settings - Fork 43
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
how to initialize with the image shown and not hidden #15
Comments
Any luck? I would like to do this also. |
I solved this by adding an attribute on the slideable called "showOnLoad" and then upon initialization check wether or not this is set. If it is, I set the height to 100% Here's the code:
|
Actually, I just figured out how to add it on the template However when I add the code to the JSFiddle example, it shows the text on load, but it does not animate until the h1 is clicked twice and then it opens it. Thanks for the great code! |
I have the same problem above, does anyone have a fix? |
@jwams it was a long time ago i used this, and i dont have any code left for it. Just took a quick look at the code and the reason you have to click twice is because you dont have attrs.expanded set, which is going to default to false. To fix this you can set expanded="true" like this:
and then it will activate on the first click. I didn't however get it to animate properly on the first click, and cant spend a lot of time on it at the moment. But maybe you can work on it from there :) |
I am trying to find ways to make the default state for the images as shown and give the user the option to hide
The text was updated successfully, but these errors were encountered: