-
Notifications
You must be signed in to change notification settings - Fork 56
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
No close button on the overlay #3
Comments
Wanted to also comment on this. If the image takes up the entire screen or leaves very small area of the overlay to click you can't close the gallery. A close button or maybe clicking the image itself would close the gallery is needed. |
I was also looking for a solution for this. But I couldn't find one so I made something myself you can find it in the comments of the touchTouch article. http://tutorialzine.com/2012/04/mobile-touch-gallery/#comment-41494 I am pretty new to js/jquery so maybe its a bit sloppy but it works like a charm. |
I made a fork of this project with a new config option. $('#thumbnails a').touchTouch({imgCloser: true}); This will add a close button to the top-right corner of each image. Hope this helps other people. If it's worthwhile I'm happy for the changes to be folded back into the original project here :) Mike |
Oops, I should mention the Git project: https://github.com/starkraving/touchTouch Mike |
Hey starkraving I wanted to use your close button. I updated my code and css to the one you modified. But nothing is showing. Since I dont have any close icons Im guessing I have to add the path of the closing button to the touchtouch.js file or does it go somewhere in the css file? |
Hey there, my code adds an optional config to the touchTouch call. To use: The option imgCloser defaults to false so that it appears the same as the original. Just add the options object with the value of imgCloser set to true to enable the close buttons. The close button is pure CSS, no image needed. HTH! Mike |
@starkraving I just used your code instead. There needs to be a pull request to get this integrated into main codebase... that is, after the CSS for mobile is fixed. It's too far off the screen. |
Just thinking that the overlay should probably contain something to hide it the same way touching the background does. Given that the first impulse of a user is to press the "back" button, kicking him out of the gallery. It could actually be seen as a usability issue. Anyway, just my 2 cents, thanks for your work.
The text was updated successfully, but these errors were encountered: