Add option to close guider upon clicking outside #87

Open
wants to merge 2 commits into
from

Projects

None yet

5 participants

@mattflaschen

This adds an option, defaulted to false. If it is true, the guider will close if you click outside of it.

@mattflaschen

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.

@pickhardt
Owner
@mattflaschen

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.

and others added some commits Jan 27, 2013
@pickhardt First commit of the dev branch and beginning of version 2.0.0! Change…
…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)
1b8bb32
@mattflaschen mattflaschen Add closeOnClickOutside option to close guider upon click outside.
Change-Id: Id5e6d001d3a42454680af21c2e96b068be464221
9f7900d
@mattflaschen

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.

@deepthawtz

is this PR still being considered?

@pickhardt
Owner
@zackshapiro

@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.

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