-
Notifications
You must be signed in to change notification settings - Fork 183
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
Add option to close guider upon clicking outside #87
base: master
Are you sure you want to change the base?
Conversation
There's a required bug fix to unbind this event when the guider hides. If you're interested in merging the feature, let me know, and I'll update the pull request. |
Yes, I plan to include it in the next version. It's a good catch. Can you Jeff Pickhardt
|
Great. There's actually one more fix to this pull request. I'm going to get it reviewed on our side, then bundle it into this one too. |
…log: - Started keeping a changelog in changelog.txt. - Since this is a major change, I am incrementing the version number to 2.0.0. (Following Semantic Versioning, http://semver.org/) - Created a dev branch on GitHub. (https://github.com/jeff-optimizely/Guiders-JS/tree/dev) Contributors, issue pull requests to the dev branch so I can safely pull them without worrying about screwing up master code. - Changed the file names from guiders-(version).js and guiders-(version).css to simply guiders.js and guiders.css, so that it's easier to track changes in GitHub. If you want to know what version you have, just open the file or check guiders.version. - Upgraded jQuery from 1.51 to 1.90. It should still work with older versions of jQuery. - Use var guiders = this.guiders = {}; instead of var guiders = (function() { ... }) in order for guiders to attach to the window object more reliably. (Thanks @spmason spmason@7229f66#commitcomment-2506855) - Added bower support in component.json (Thanks rajkissu pickhardt#78) - Added a method: guiders.getCurrentGuider, to get the current guider. This can be useful for analytics tracking, for example. - guiders.next and guiders.prev return the value of guiders.getCurrent() - Allow creating guidres in the HTML, then creating guiders via $("#guider2").guider(options). The options can be passed in through options or set as data-attrs on the object in the HTML. (Thanks @tarr11 pickhardt#85)
Change-Id: Id5e6d001d3a42454680af21c2e96b068be464221
I've redone this against the dev branch. It adds the unbind fix, and another to avoid "losing" the first click when they click outside, but the overlay is not visible. I also refactored the close code into _handleOnClose. |
is this PR still being considered? |
Yes, I've just been pretty busy, but this is a good pull request. Thanks |
@pickhardt Wanted to +1 the request for click outside to close. Was going to implement it myself but since it's an outstanding PR, I'll wait for the merge. |
+1 |
This adds an option, defaulted to false. If it is true, the guider will close if you click outside of it.