[nwd] Initial import
Change-Id: Ie9559efba5f1d8a1292541484f38a9142d015948
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..a4f3c47
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,342 @@
+<a name="0.8.2"></a>
+## 0.8.2 (2017-07-03)
+
+
+* add anchors to examples ([bb623e3](https://github.com/kylefox/jquery-modal/commit/bb623e3))
+* Added syntax modes to code samples (closes #47) ([97c043a](https://github.com/kylefox/jquery-modal/commit/97c043a)), closes [#47](https://github.com/kylefox/jquery-modal/issues/47)
+* alias elm as $elm (fixes #205) ([c074130](https://github.com/kylefox/jquery-modal/commit/c074130)), closes [#205](https://github.com/kylefox/jquery-modal/issues/205)
+* Bind to links with multiple `rel` values ([c6fc99c](https://github.com/kylefox/jquery-modal/commit/c6fc99c)), closes [#135](https://github.com/kylefox/jquery-modal/issues/135)
+* Bump to 0.8.1 ([35b84c4](https://github.com/kylefox/jquery-modal/commit/35b84c4))
+* Bump to 0.8.2 ([196c43d](https://github.com/kylefox/jquery-modal/commit/196c43d))
+* Changelog 0.8.1 ([7a10b52](https://github.com/kylefox/jquery-modal/commit/7a10b52))
+* fix merge conflict after 0.8.1 release ([5b83154](https://github.com/kylefox/jquery-modal/commit/5b83154))
+* Merge branch 'master' of github.com:kylefox/jquery-modal ([beb02fa](https://github.com/kylefox/jquery-modal/commit/beb02fa))
+* Merge branch 'sbussetti-master' ([2428d64](https://github.com/kylefox/jquery-modal/commit/2428d64))
+* Update compositor.json ([511dd72](https://github.com/kylefox/jquery-modal/commit/511dd72))
+* Update compositor.json ([6f9ebcb](https://github.com/kylefox/jquery-modal/commit/6f9ebcb))
+* Update README.md ([334b18a](https://github.com/kylefox/jquery-modal/commit/334b18a))
+
+
+
+<a name="0.8.1"></a>
+## 0.8.1 (2017-07-03)
+
+
+* add anchors to examples ([bb623e3](https://github.com/kylefox/jquery-modal/commit/bb623e3))
+* Added syntax modes to code samples (closes #47) ([97c043a](https://github.com/kylefox/jquery-modal/commit/97c043a)), closes [#47](https://github.com/kylefox/jquery-modal/issues/47)
+* alias elm as $elm (fixes #205) ([c074130](https://github.com/kylefox/jquery-modal/commit/c074130)), closes [#205](https://github.com/kylefox/jquery-modal/issues/205)
+* Bind to links with multiple `rel` values ([c6fc99c](https://github.com/kylefox/jquery-modal/commit/c6fc99c)), closes [#135](https://github.com/kylefox/jquery-modal/issues/135)
+* Bump to 0.8.1 ([35b84c4](https://github.com/kylefox/jquery-modal/commit/35b84c4))
+* Merge branch 'master' of github.com:kylefox/jquery-modal ([beb02fa](https://github.com/kylefox/jquery-modal/commit/beb02fa))
+* Update compositor.json ([511dd72](https://github.com/kylefox/jquery-modal/commit/511dd72))
+* Update compositor.json ([6f9ebcb](https://github.com/kylefox/jquery-modal/commit/6f9ebcb))
+* Update README.md ([334b18a](https://github.com/kylefox/jquery-modal/commit/334b18a))
+
+
+
+<a name="0.8.0"></a>
+# 0.8.0 (2016-09-11)
+
+
+* Bump to 0.8.0 ([1bc2a6b](https://github.com/kylefox/jquery-modal/commit/1bc2a6b))
+* document $.modal.getCurrent() ([1310ef1](https://github.com/kylefox/jquery-modal/commit/1310ef1))
+* Make modal more responsive-friendly ([b721dda](https://github.com/kylefox/jquery-modal/commit/b721dda))
+
+
+
+<a name="0.7.3"></a>
+## 0.7.3 (2016-09-11)
+
+
+* Add $.modal.getCurrent() to retrieve current instance (if any) ([aee8564](https://github.com/kylefox/jquery-modal/commit/aee8564)), closes [#178](https://github.com/kylefox/jquery-modal/issues/178)
+
+
+
+<a name="0.7.2"></a>
+## 0.7.2 (2016-09-11)
+
+
+* Bump to 0.7.2 ([51575f3](https://github.com/kylefox/jquery-modal/commit/51575f3))
+* contributing notes (resolves #164) ([b07d3ba](https://github.com/kylefox/jquery-modal/commit/b07d3ba)), closes [#164](https://github.com/kylefox/jquery-modal/issues/164)
+* log AFTER_CLOSE event in examples ([019f03e](https://github.com/kylefox/jquery-modal/commit/019f03e))
+* Merge pull request #177 from shane-tomlinson/jquery-3.1 ([b49206b](https://github.com/kylefox/jquery-modal/commit/b49206b))
+* Support for jQuery 3.x ([0576775](https://github.com/kylefox/jquery-modal/commit/0576775))
+* Update README.md ([9448759](https://github.com/kylefox/jquery-modal/commit/9448759))
+* Update README.md ([9e5491b](https://github.com/kylefox/jquery-modal/commit/9e5491b))
+* Update README.md ([e345ddb](https://github.com/kylefox/jquery-modal/commit/e345ddb))
+* Update README.md ([6e50636](https://github.com/kylefox/jquery-modal/commit/6e50636))
+* Update to jQuery 3.1.0 in examples ([181b31f](https://github.com/kylefox/jquery-modal/commit/181b31f))
+
+
+
+<a name="0.7.1"></a>
+## 0.7.1 (2016-08-18)
+
+
+* add minified css ([4f43415](https://github.com/kylefox/jquery-modal/commit/4f43415))
+* add snippet to be able to load jquery as a module ([a3f1508](https://github.com/kylefox/jquery-modal/commit/a3f1508))
+* add the minified javascript source ([27c88ac](https://github.com/kylefox/jquery-modal/commit/27c88ac))
+* Explain events. ([99034ae](https://github.com/kylefox/jquery-modal/commit/99034ae))
+* Merge pull request #154 from YuriBrunetto/min-css ([8a45590](https://github.com/kylefox/jquery-modal/commit/8a45590))
+* Merge pull request #166 from Cryde/master ([85267db](https://github.com/kylefox/jquery-modal/commit/85267db))
+
+
+
+<a name="0.7.0"></a>
+# 0.7.0 (2016-03-17)
+
+
+### NEW
+
+* Added a demo for closeExisting ([b311bb5](https://github.com/kylefox/jquery-modal/commit/b311bb5))
+* CSS tweak: removed opacity on .behind > .modal ([35db0c4](https://github.com/kylefox/jquery-modal/commit/35db0c4))
+* Updated README.md ([c87c3e4](https://github.com/kylefox/jquery-modal/commit/c87c3e4))
+* NEW: closeExisting property ([c6c767e](https://github.com/kylefox/jquery-modal/commit/c6c767e))
+
+* Update index.html ([f5dbf0e](https://github.com/kylefox/jquery-modal/commit/f5dbf0e))
+* important lynx ([c7af630](https://github.com/kylefox/jquery-modal/commit/c7af630))
+* Update README.md ([a57aee4](https://github.com/kylefox/jquery-modal/commit/a57aee4))
+
+
+<a name="0.6.1"></a>
+## 0.6.1 (2016-01-20)
+
+
+### Fix
+
+* Fix: modals with fade not displaying again after initial open/close (Closes #138) ([7dbe45f](https://github.com/kylefox/jquery-modal/commit/7dbe45f)), closes [#138](https://github.com/kylefox/jquery-modal/issues/138)
+
+
+
+<a name="0.6.0"></a>
+# 0.6.0 (2015-11-17)
+
+
+### Feature
+
+* Feature: CHANGELOG.md auto-updating ([10920d7](https://github.com/kylefox/jquery-modal/commit/10920d7))
+
+### Refactor
+
+* Refactor: wrap .modal in .blocker (fix #69) ([38e4a99](https://github.com/kylefox/jquery-modal/commit/38e4a99)), closes [#69](https://github.com/kylefox/jquery-modal/issues/69)
+
+* Add CHANGELOG.md generated with conventional-changelog ([2529249](https://github.com/kylefox/jquery-modal/commit/2529249))
+* Examples update ([d04a375](https://github.com/kylefox/jquery-modal/commit/d04a375))
+* Remove deprecated version field from bower.json ([c280742](https://github.com/kylefox/jquery-modal/commit/c280742))
+* Removed resize() remnant ([dc42d4e](https://github.com/kylefox/jquery-modal/commit/dc42d4e))
+* Styling moved to CSS + center/resize() removed ([0ac5f7b](https://github.com/kylefox/jquery-modal/commit/0ac5f7b))
+
+
+
+<a name="0.5.11"></a>
+## 0.5.11 (2015-11-15)
+
+
+* added style to package.json ([bdb577f](https://github.com/kylefox/jquery-modal/commit/bdb577f))
+* Bump to 0.5.11 ([abd5556](https://github.com/kylefox/jquery-modal/commit/abd5556))
+* Merge pull request #128 from mciparelli/add-style-to-package-json ([ec984b3](https://github.com/kylefox/jquery-modal/commit/ec984b3))
+* Merge pull request #132 from muzll0dr/master ([82187e1](https://github.com/kylefox/jquery-modal/commit/82187e1))
+* Replacing images with base64 encoded counterparts. ([dab8d0d](https://github.com/kylefox/jquery-modal/commit/dab8d0d))
+
+
+
+<a name="0.5.10"></a>
+## 0.5.10 (2015-10-23)
+
+
+### Bugfix
+
+* Bugfix: modal always fading ([b357293](https://github.com/kylefox/jquery-modal/commit/b357293))
+
+* Bump to 0.5.10 ([893b6bf](https://github.com/kylefox/jquery-modal/commit/893b6bf))
+* comma ([55cf9e1](https://github.com/kylefox/jquery-modal/commit/55cf9e1))
+* Merge pull request #126 from xfra35/issue126 ([9fdbbde](https://github.com/kylefox/jquery-modal/commit/9fdbbde))
+
+
+
+<a name="0.5.9"></a>
+## 0.5.9 (2015-10-09)
+
+
+* Add AFTER_CLOSE event (fixes #122) ([fc55c9e](https://github.com/kylefox/jquery-modal/commit/fc55c9e)), closes [#122](https://github.com/kylefox/jquery-modal/issues/122)
+* Bump to 0.5.9 ([b99ee76](https://github.com/kylefox/jquery-modal/commit/b99ee76))
+* gulp stuffs ([2a1f3bc](https://github.com/kylefox/jquery-modal/commit/2a1f3bc))
+* Merge pull request #123 from paaatrick/master ([8192e84](https://github.com/kylefox/jquery-modal/commit/8192e84)), closes [#122](https://github.com/kylefox/jquery-modal/issues/122)
+
+
+
+<a name="0.5.8"></a>
+## 0.5.8 (2015-08-25)
+
+
+* Add npm & Bower to README.md ([e35dd82](https://github.com/kylefox/jquery-modal/commit/e35dd82))
+* Added main field to package.json ([14f1d75](https://github.com/kylefox/jquery-modal/commit/14f1d75))
+* Bump to 0.5.8 ([f28d2cd](https://github.com/kylefox/jquery-modal/commit/f28d2cd))
+* Merge pull request #117 from sebastiandedeyne/master ([2db7d68](https://github.com/kylefox/jquery-modal/commit/2db7d68))
+* Type ([cc6107b](https://github.com/kylefox/jquery-modal/commit/cc6107b))
+
+
+
+<a name="0.5.7"></a>
+## 0.5.7 (2015-08-17)
+
+
+* Add package.json ([d796397](https://github.com/kylefox/jquery-modal/commit/d796397))
+* Bump to v.0.5.7 ([3040475](https://github.com/kylefox/jquery-modal/commit/3040475))
+* comma comma comma comma comma chameleon ([4dd7519](https://github.com/kylefox/jquery-modal/commit/4dd7519))
+* gtfo npm-debug.log ([705548b](https://github.com/kylefox/jquery-modal/commit/705548b))
+* Merge pull request #107 from Useclark/node ([d4b8f9a](https://github.com/kylefox/jquery-modal/commit/d4b8f9a))
+* More info to package.json ([f167be9](https://github.com/kylefox/jquery-modal/commit/f167be9))
+* Update .gitignore ([8eabc58](https://github.com/kylefox/jquery-modal/commit/8eabc58))
+* Version bump to 0.5.6 ([8e088df](https://github.com/kylefox/jquery-modal/commit/8e088df))
+
+
+
+<a name="0.5.5"></a>
+## 0.5.5 (2015-04-03)
+
+
+* `var statement to prevent `that` from leaking into the global scope ([b7865f5](https://github.com/kylefox/jquery-modal/commit/b7865f5))
+* Added a $.modal.isActive function to detect if a modal is currently open ([2997f7a](https://github.com/kylefox/jquery-modal/commit/2997f7a))
+* Added bower.json (fix #68) ([95bfae2](https://github.com/kylefox/jquery-modal/commit/95bfae2)), closes [#68](https://github.com/kylefox/jquery-modal/issues/68)
+* Added fadeDelay option ([2781b47](https://github.com/kylefox/jquery-modal/commit/2781b47))
+* Added option to add css class(es) to close link ([33c0c20](https://github.com/kylefox/jquery-modal/commit/33c0c20))
+* Best README update. ([36e6c4a](https://github.com/kylefox/jquery-modal/commit/36e6c4a))
+* Bump to 0.5.4 — added fade transitions ([5d894b4](https://github.com/kylefox/jquery-modal/commit/5d894b4))
+* Bumped version in bower.json ([4496fac](https://github.com/kylefox/jquery-modal/commit/4496fac))
+* Correct code on readme ([ea66eb9](https://github.com/kylefox/jquery-modal/commit/ea66eb9))
+* correct duration ([1b8311b](https://github.com/kylefox/jquery-modal/commit/1b8311b))
+* Docs for $.modal.isActive() ([e7a43d9](https://github.com/kylefox/jquery-modal/commit/e7a43d9))
+* examples bump to query 1.8 ([93140bd](https://github.com/kylefox/jquery-modal/commit/93140bd))
+* experimenting with fade in/out. Not super clean, but works... ([15a00ca](https://github.com/kylefox/jquery-modal/commit/15a00ca))
+* Fix blocker z-index issue ([e9f8035](https://github.com/kylefox/jquery-modal/commit/e9f8035))
+* Fix jQuery Bower dependency to be less strict. ([3b97a42](https://github.com/kylefox/jquery-modal/commit/3b97a42))
+* fix typo README.md ([1ead135](https://github.com/kylefox/jquery-modal/commit/1ead135))
+* Link to jquery-modal-rails plugin ([e66cd21](https://github.com/kylefox/jquery-modal/commit/e66cd21))
+* make the demo just a bit prettier. ([2f7292b](https://github.com/kylefox/jquery-modal/commit/2f7292b))
+* Merge branch 'zjr-master' ([cf24354](https://github.com/kylefox/jquery-modal/commit/cf24354))
+* Merge pull request #102 from kyaido/fix-typo ([0d06160](https://github.com/kylefox/jquery-modal/commit/0d06160))
+* Merge pull request #31 from christiannaths/master ([ac052dd](https://github.com/kylefox/jquery-modal/commit/ac052dd))
+* Merge pull request #37 from bensmithett/master ([3aba9bf](https://github.com/kylefox/jquery-modal/commit/3aba9bf))
+* Merge pull request #54 from chrisjlee/patch-1 ([7df6e01](https://github.com/kylefox/jquery-modal/commit/7df6e01))
+* Merge pull request #60 from xyanide/patch-1 ([c0de654](https://github.com/kylefox/jquery-modal/commit/c0de654))
+* Merge pull request #72 from DubFriend/master ([c0141bb](https://github.com/kylefox/jquery-modal/commit/c0141bb))
+* Merge pull request #84 from okuyan/modal_in_parent_with_zindex ([125da70](https://github.com/kylefox/jquery-modal/commit/125da70))
+* Merge pull request #94 from CodeYellowBV/master ([c2a972f](https://github.com/kylefox/jquery-modal/commit/c2a972f))
+* minification note ([8dfef26](https://github.com/kylefox/jquery-modal/commit/8dfef26))
+* minify with closure compiler ([b7c16e6](https://github.com/kylefox/jquery-modal/commit/b7c16e6))
+* Namespace automatically attached click event listeners ([08cfc99](https://github.com/kylefox/jquery-modal/commit/08cfc99))
+* Update README ([a2abe80](https://github.com/kylefox/jquery-modal/commit/a2abe80))
+* Update README to reflect transitions. ([bb8f6f2](https://github.com/kylefox/jquery-modal/commit/bb8f6f2))
+* Update README.md ([d7aa798](https://github.com/kylefox/jquery-modal/commit/d7aa798))
+* Update README.md ([5e9bdc3](https://github.com/kylefox/jquery-modal/commit/5e9bdc3))
+* Update README.md ([28d746d](https://github.com/kylefox/jquery-modal/commit/28d746d))
+* Update README.md ([a8f4b88](https://github.com/kylefox/jquery-modal/commit/a8f4b88))
+* Update README.md ([ff0156f](https://github.com/kylefox/jquery-modal/commit/ff0156f))
+* Update README.md ([8e237fe](https://github.com/kylefox/jquery-modal/commit/8e237fe))
+* Update README.md ([9ee96e0](https://github.com/kylefox/jquery-modal/commit/9ee96e0))
+* Update README.md ([8589421](https://github.com/kylefox/jquery-modal/commit/8589421))
+* Update README.md ([9b178b4](https://github.com/kylefox/jquery-modal/commit/9b178b4))
+* Update README.md ([35afe59](https://github.com/kylefox/jquery-modal/commit/35afe59))
+* Version bump (minor bug fix) ([bb5da2d](https://github.com/kylefox/jquery-modal/commit/bb5da2d))
+* Version bump (minor bug fix) ([de39bf9](https://github.com/kylefox/jquery-modal/commit/de39bf9))
+* Would close #39 if necessary ([04e8fad](https://github.com/kylefox/jquery-modal/commit/04e8fad)), closes [#39](https://github.com/kylefox/jquery-modal/issues/39)
+* wrapped this.remove with .remove ([787f8cc](https://github.com/kylefox/jquery-modal/commit/787f8cc))
+
+
+
+<a name="0.5.2"></a>
+## 0.5.2 (2013-01-26)
+
+
+* Add a new event when I receive data via AJAX to become informed when the dialog is up and running ([2ca8ae5](https://github.com/kylefox/jquery-modal/commit/2ca8ae5))
+* Added AJAX_BEFORE_SEND and AJAX_SUCCESS events. ([fbe9437](https://github.com/kylefox/jquery-modal/commit/fbe9437))
+* Added example to demo. Minified js. ([d9145ff](https://github.com/kylefox/jquery-modal/commit/d9145ff))
+* Added some AJAX spinners. ([f0b47e1](https://github.com/kylefox/jquery-modal/commit/f0b47e1))
+* Added spinner custom events ([9af1c83](https://github.com/kylefox/jquery-modal/commit/9af1c83))
+* Added spinner support ([2fc94c7](https://github.com/kylefox/jquery-modal/commit/2fc94c7))
+* Bug fixing ([6267f6f](https://github.com/kylefox/jquery-modal/commit/6267f6f))
+* Bumped to 0.5.1 - new Ajax complete event. ([da3509a](https://github.com/kylefox/jquery-modal/commit/da3509a))
+* Bumped to v0.3.0 (requires jQuery 1.7) ([148d228](https://github.com/kylefox/jquery-modal/commit/148d228))
+* Bumped to v0.4 ([0c7da49](https://github.com/kylefox/jquery-modal/commit/0c7da49))
+* Changed bind/unbind and live with on/off methods ([421516e](https://github.com/kylefox/jquery-modal/commit/421516e))
+* changed event name ([b32de0b](https://github.com/kylefox/jquery-modal/commit/b32de0b))
+* demodemo ([cd84ce3](https://github.com/kylefox/jquery-modal/commit/cd84ce3))
+* Issue #20: Added AJAX_FAIL event. ([4c72b25](https://github.com/kylefox/jquery-modal/commit/4c72b25))
+* made plugin chainable ([71b7f03](https://github.com/kylefox/jquery-modal/commit/71b7f03))
+* Manually bringing in 9f11170 from adrianolaru (closes #4 and #10) ([7786e73](https://github.com/kylefox/jquery-modal/commit/7786e73)), closes [#4](https://github.com/kylefox/jquery-modal/issues/4) [#10](https://github.com/kylefox/jquery-modal/issues/10)
+* Manually fix #17 (Made code more object oriented) ([bd4331c](https://github.com/kylefox/jquery-modal/commit/bd4331c)), closes [#17](https://github.com/kylefox/jquery-modal/issues/17)
+* Merge branch 'master' of github.com:kylefox/jquery-modal into ajax ([9c7c9cd](https://github.com/kylefox/jquery-modal/commit/9c7c9cd))
+* Merge pull request #10 from adrianolaru/change-public-api ([168e30a](https://github.com/kylefox/jquery-modal/commit/168e30a))
+* Merge pull request #11 from adrianolaru/bugfixing ([87d4e6b](https://github.com/kylefox/jquery-modal/commit/87d4e6b))
+* Merge pull request #13 from adrianolaru/bugfixing ([f2fa333](https://github.com/kylefox/jquery-modal/commit/f2fa333))
+* Merge pull request #16 from adrianolaru/bugfixing ([33a06fa](https://github.com/kylefox/jquery-modal/commit/33a06fa))
+* Merge pull request #18 from RyanonRails/patch-1 ([bb12f5a](https://github.com/kylefox/jquery-modal/commit/bb12f5a))
+* Merge pull request #20 from adrianolaru/spinner ([eb2dadc](https://github.com/kylefox/jquery-modal/commit/eb2dadc))
+* Merge pull request #21 from adrianolaru/spinner ([a4a325d](https://github.com/kylefox/jquery-modal/commit/a4a325d))
+* Merge pull request #22 from dei79/master ([3f68f34](https://github.com/kylefox/jquery-modal/commit/3f68f34))
+* Merge pull request #8 from adrianolaru/new-events-methods ([ba3cda3](https://github.com/kylefox/jquery-modal/commit/ba3cda3))
+* Merge pull request #9 from adrianolaru/bugfixing ([b86be47](https://github.com/kylefox/jquery-modal/commit/b86be47))
+* Minor bug fixing ([2865c27](https://github.com/kylefox/jquery-modal/commit/2865c27))
+* Missing comma :D ([89977d2](https://github.com/kylefox/jquery-modal/commit/89977d2))
+* Missing words in README! ([5316599](https://github.com/kylefox/jquery-modal/commit/5316599))
+* Moved static methods from $.fn.modal to $.modal ([9f11170](https://github.com/kylefox/jquery-modal/commit/9f11170))
+* no newline at end of file ([3983c79](https://github.com/kylefox/jquery-modal/commit/3983c79))
+* Nuke .DS_Store ([f04077f](https://github.com/kylefox/jquery-modal/commit/f04077f))
+* One spinner style is sufficient. ([5005ae8](https://github.com/kylefox/jquery-modal/commit/5005ae8))
+* Only create spinner where necessary, remove from DOM when "hidden" ([40bae80](https://github.com/kylefox/jquery-modal/commit/40bae80))
+* opt out the spinner ([449671d](https://github.com/kylefox/jquery-modal/commit/449671d))
+* Option for adding additional classes to the close button ([cdfb863](https://github.com/kylefox/jquery-modal/commit/cdfb863))
+* Renamed AJAX events, updated README to document spinner & ajax events. ([c53fca7](https://github.com/kylefox/jquery-modal/commit/c53fca7))
+* Resolves #30: Added explicit MIT license ([a7feb44](https://github.com/kylefox/jquery-modal/commit/a7feb44)), closes [#30](https://github.com/kylefox/jquery-modal/issues/30)
+* Should fix #34 (Multiple Modals) without breaking anything... ([84b9e74](https://github.com/kylefox/jquery-modal/commit/84b9e74)), closes [#34](https://github.com/kylefox/jquery-modal/issues/34)
+* Update README & examples to show that manually opened AJAX modals must be wrapped in a div with clas ([810f8d7](https://github.com/kylefox/jquery-modal/commit/810f8d7))
+* updated README ([eab14ef](https://github.com/kylefox/jquery-modal/commit/eab14ef))
+* v0.3.1 ([4dd79d3](https://github.com/kylefox/jquery-modal/commit/4dd79d3))
+* Version 0.5 - AJAX feedback UI & events. ([cb76e3c](https://github.com/kylefox/jquery-modal/commit/cb76e3c))
+* When invoking manually, make sure the $ selection is not empty ([f750f2a](https://github.com/kylefox/jquery-modal/commit/f750f2a))
+
+
+
+<a name="0.2.5"></a>
+## 0.2.5 (2012-02-03)
+
+
+### Fix
+
+* Fix: modal position should be fixed, not absolute. ([5bc6c9f](https://github.com/kylefox/jquery-modal/commit/5bc6c9f))
+
+* 0.1 "release" ([30732cc](https://github.com/kylefox/jquery-modal/commit/30732cc))
+* Actual min/pack versions ([38d3e66](https://github.com/kylefox/jquery-modal/commit/38d3e66))
+* Added 'closeText' option & bumped patch version. ([effbffb](https://github.com/kylefox/jquery-modal/commit/effbffb))
+* Added $.modal.resize(). All it does at the moment is re-centre the modal (because there is no fixed ([b191b8c](https://github.com/kylefox/jquery-modal/commit/b191b8c))
+* Added an image ... *sigh*. Bumped version to 0.2.1 (will start doing patch version increments for m ([3da2f27](https://github.com/kylefox/jquery-modal/commit/3da2f27))
+* Added auto-binding based on "rel" attributes and an example page. ([54377f4](https://github.com/kylefox/jquery-modal/commit/54377f4))
+* Added basic working version. ([2518eef](https://github.com/kylefox/jquery-modal/commit/2518eef))
+* Added detection for AJAX links, updated README. ([468194e](https://github.com/kylefox/jquery-modal/commit/468194e))
+* Added escape-key binding, update example. ([fc63faf](https://github.com/kylefox/jquery-modal/commit/fc63faf))
+* Added events ([99aa155](https://github.com/kylefox/jquery-modal/commit/99aa155))
+* Added link to README. ([e74bf96](https://github.com/kylefox/jquery-modal/commit/e74bf96))
+* combined calls to $.addclass ([7c415ad](https://github.com/kylefox/jquery-modal/commit/7c415ad))
+* Events are now triggered on the modal element itself. Modals are automatically bound to links with ([a49bf8c](https://github.com/kylefox/jquery-modal/commit/a49bf8c))
+* Fix #7: pass jQuery to anonymous function and accept as '$' in argument ([4321d01](https://github.com/kylefox/jquery-modal/commit/4321d01)), closes [#7](https://github.com/kylefox/jquery-modal/issues/7)
+* fix bug with escapeClose option ([d83677c](https://github.com/kylefox/jquery-modal/commit/d83677c))
+* Fix issue #2 -- "Close" button element wasn't being removed when modal was closed. ([8998d63](https://github.com/kylefox/jquery-modal/commit/8998d63)), closes [#2](https://github.com/kylefox/jquery-modal/issues/2)
+* Fixed #3 (use outerHeight), bumped to 0.2.3. Also dropped the packed file. ([e399651](https://github.com/kylefox/jquery-modal/commit/e399651)), closes [#3](https://github.com/kylefox/jquery-modal/issues/3)
+* Link back to repo ([8838835](https://github.com/kylefox/jquery-modal/commit/8838835))
+* make regex negligibly faster ([c56fe3e](https://github.com/kylefox/jquery-modal/commit/c56fe3e))
+* Merge pull request #5 from elidupuis/master ([31c14a2](https://github.com/kylefox/jquery-modal/commit/31c14a2))
+* Merge pull request #6 from elidupuis/master ([0e1cadc](https://github.com/kylefox/jquery-modal/commit/0e1cadc))
+* Moved examples into examples/ ([c420fdc](https://github.com/kylefox/jquery-modal/commit/c420fdc))
+* README LIVES ([f207b12](https://github.com/kylefox/jquery-modal/commit/f207b12))
+* remove current class on modal close ([77fbf5f](https://github.com/kylefox/jquery-modal/commit/77fbf5f))
+* some stuffs. ([a47db2c](https://github.com/kylefox/jquery-modal/commit/a47db2c))
+* Updated README (ajax + events) ([5f576e4](https://github.com/kylefox/jquery-modal/commit/5f576e4))
+* Updated README, renamed some files. ([2bafca0](https://github.com/kylefox/jquery-modal/commit/2bafca0))
+* Updated README. ([1865c30](https://github.com/kylefox/jquery-modal/commit/1865c30))
+* Version 0.2 ([b89392f](https://github.com/kylefox/jquery-modal/commit/b89392f))
+* Version bump ([5350977](https://github.com/kylefox/jquery-modal/commit/5350977))
+* wrap ajax content in div ([59c58be](https://github.com/kylefox/jquery-modal/commit/59c58be))
+
+
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..9265be8
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,25 @@
+jQuery Modal is distributed under the MIT License.
+Learn more at http://opensource.org/licenses/mit-license.php
+
+---
+
+Copyright (c) 2012 Kyle Fox
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..a8cde94
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,13 @@
+name: "jquery-modal"
+description:
+ "A simple & lightweight method of displaying modal windows with jQuery."
+
+third_party {
+ url {
+ type: GIT
+ value: "https://github.com/kylefox/jquery-modal.git"
+ }
+ version: "v0.9.1"
+ last_upgrade_date { year: 2017 month: 10 day: 17 }
+ license_type: NOTICE
+}
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e999680
--- /dev/null
+++ b/README.md
@@ -0,0 +1,359 @@
+A simple & lightweight method of displaying modal windows with jQuery.
+
+For quick examples and demos, head to [jquerymodal.com](http://jquerymodal.com/).
+
+# Why another modal plugin?
+
+Most plugins I've found try to do too much, and have specialized ways of handling photo galleries, iframes and video. The resulting HTML & CSS is often bloated and difficult to customize.
+
+By contrast, this plugin handles the two most common scenarios I run into
+
+* displaying an existing DOM element
+* loading a page with AJAX
+
+and does so with as little HTML & CSS as possible.
+
+# Installation
+
+You can install [jquery-modal](https://www.npmjs.com/package/jquery-modal) with npm:
+
+`npm install jquery-modal`
+
+or with [Bower](http://bower.io/):
+
+`bower install jquery-modal`
+
+or use the hosted version from [cdnjs](https://cdnjs.com/libraries/jquery-modal):
+
+```html
+<!-- Remember to include jQuery :) -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
+
+<!-- jQuery Modal -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css" />
+```
+
+**Using Rails?** Check out the [jquery-modal-rails plugin](https://github.com/dei79/jquery-modal-rails)!
+
+**jQuery Requirements:** As of version 0.3.0, jQuery 1.7 is required. If you're using an earlier version of jQuery you can use the [v.0.2.5 tag.](https://github.com/kylefox/jquery-modal/tags)
+
+**Naming conflict with Bootstrap:** Bootstrap's [modal](http://getbootstrap.com/javascript/#modals) uses the same `$.modal` namespace. If you want to use jquery-modal with Bootstrap, the simplest solution is to manually modify the name of this plugin.
+
+# Opening
+
+#### Method 1: Automatically attaching to links
+
+The simplest approach is to add `rel="modal:open"` to your links and use the `href` attribute to specify what to open in the modal.
+
+Open an existing DOM element by ID:
+
+```html
+<form id="login-form" class="modal">
+ ...
+</form>
+
+<a href="#login-form" rel="modal:open">Login</a>
+```
+
+Load a remote URL with AJAX:
+
+```html
+<a href="login.html" rel="modal:open">Login</a>
+```
+
+#### Method 2: Manually
+
+You can manually open a modal by calling the `.modal()` method on the element:
+
+```html
+<form id="login-form" class="modal">
+ ...
+</form>
+```
+
+```js
+$('#login-form').modal();
+```
+
+You can also invoke `.modal()` directly on links:
+
+```html
+<a href="#ex5" data-modal>Open a DOM element</a>
+<a href="ajax.html" data-modal>Open an AJAX modal</a>
+```
+
+```js
+$('a[data-modal]').click(function(event) {
+ $(this).modal();
+ return false;
+});
+```
+
+### Compatibility Fallback
+
+You can provide a clean fallback for users who have JavaScript disabled by manually attaching the modal via the `data-modal` attribute. This allows you to write your links pointing to the `href` as normal (fallback) while enabling modals where JavaScript is enabled.
+
+```html
+<!-- By default link takes user to /login.html -->
+<a href="/login.html" data-modal="#login-modal">Login</a>
+
+<!-- Login modal embedded in page -->
+<div id="login-modal" class="modal">
+ ...
+</div>
+
+<!-- For browsers with JavaScript, open the modal. -->
+<script>
+ $(function() {
+ $('a[data-modal]').on('click', function() {
+ $($(this).data('modal')).modal();
+ return false;
+ });
+ });
+</script>
+```
+
+#### Fade Transitions
+
+By default the overlay & window appear instantaneously, but you can enable a fade effect by specifying the `fadeDuration` option.
+
+```js
+$('a.open-modal').click(function(event) {
+ $(this).modal({
+ fadeDuration: 250
+ });
+ return false;
+});
+```
+
+This will fade in the overlay and modal over 250 milliseconds _simultaneously._ If you want the effect of the overlay appearing _before_ the window, you can specify the `fadeDelay` option. This indicates at what point during the overlay transition the window transition should begin.
+
+So if you wanted the window to fade in when the overlay's was 80% finished:
+
+```js
+$(elm).modal({
+ fadeDuration: 250,
+ fadeDelay: 0.80
+});
+```
+
+Or, if you wanted the window to fade in a few moments after the overlay transition has completely finished:
+
+```js
+$(elm).modal({
+ fadeDuration: 250,
+ fadeDelay: 1.5
+});
+```
+
+The `fadeDelay` option only applies when opening the modal. When closing the modal, both the modal and the overlay fade out simultaneously according to the `fadeDuration` setting.
+
+Fading is the only supported transition.
+
+# Closing
+
+Because there can be only one modal active at a single time, there's no need to select which modal to close:
+
+```js
+$.modal.close();
+```
+
+Similar to how links can be automatically bound to open modals, they can be bound to close modals using `rel="modal:close"`:
+
+```html
+<a href="#close" rel="modal:close">Close window</a>
+```
+
+_(Note that modals loaded with AJAX are removed from the DOM when closed)._
+
+# Checking current state
+
+* Use `$.modal.isActive()` to check if a modal is currently being displayed.
+* Use `$.modal.getCurrent()` to retrieve a reference to the currently active modal instance, if any.
+
+# Options
+
+These are the supported options and their default values:
+
+```js
+$.modal.defaults = {
+ closeExisting: true, // Close existing modals. Set this to false if you need to stack multiple modal instances.
+ escapeClose: true, // Allows the user to close the modal by pressing `ESC`
+ clickClose: true, // Allows the user to close the modal by clicking the overlay
+ closeText: 'Close', // Text content for the close <a> tag.
+ closeClass: '', // Add additional class(es) to the close <a> tag.
+ showClose: true, // Shows a (X) icon/link in the top-right corner
+ modalClass: "modal", // CSS class added to the element being displayed in the modal.
+ blockerClass: "modal", // CSS class added to the overlay (blocker).
+
+ // HTML appended to the default spinner during AJAX requests.
+ spinnerHtml: '<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>',
+
+ showSpinner: true, // Enable/disable the default spinner during AJAX requests.
+ fadeDuration: null, // Number of milliseconds the fade transition takes (null means no transition)
+ fadeDelay: 1.0 // Point during the overlay's fade-in that the modal begins to fade in (.5 = 50%, 1.5 = 150%, etc.)
+};
+```
+
+# Events
+
+The following events are triggered on the modal element at various points in the open/close cycle (see below for AJAX events).
+
+```javascript
+$.modal.BEFORE_BLOCK = 'modal:before-block'; // Fires just before the overlay (blocker) appears.
+$.modal.BLOCK = 'modal:block'; // Fires after the overlay (block) is visible.
+$.modal.BEFORE_OPEN = 'modal:before-open'; // Fires just before the modal opens.
+$.modal.OPEN = 'modal:open'; // Fires after the modal has finished opening.
+$.modal.BEFORE_CLOSE = 'modal:before-close'; // Fires when the modal has been requested to close.
+$.modal.CLOSE = 'modal:close'; // Fires when the modal begins closing (including animations).
+$.modal.AFTER_CLOSE = 'modal:after-close'; // Fires after the modal has fully closed (including animations).
+```
+
+The first and only argument passed to these event handlers is the `modal` object, which has three properties:
+
+```js
+modal.$elm; // Original jQuery object upon which modal() was invoked.
+modal.options; // Options passed to the modal.
+modal.$blocker; // The overlay element.
+```
+
+So, you could do something like this:
+
+```js
+$('#purchase-form').on($.modal.BEFORE_CLOSE, function(event, modal) {
+ clear_shopping_cart();
+});
+```
+
+# AJAX
+
+## Basic support
+
+jQuery Modal uses $.get for basic AJAX support. A simple spinner will be displayed by default (if you've included modal.css) and will have the class `modal-spinner`. If you've set the `modalClass` option, the spinner will be prefixed with that class name instead.
+
+You can add text or additional HTML to the spinner with the `spinnerHtml` option, or disable the spinner entirely by setting `showSpinner: false`.
+
+The default spinner is from the excellent [SpinKit](http://tobiasahlin.com/spinkit/) by [Tobias Ahlin](https://twitter.com/tobiasahlin) 👍
+
+## Events
+
+The following events are triggered when AJAX modals are requested.
+
+```js
+$.modal.AJAX_SEND = 'modal:ajax:send';
+$.modal.AJAX_SUCCESS = 'modal:ajax:success';
+$.modal.AJAX_FAIL = 'modal:ajax:fail';
+$.modal.AJAX_COMPLETE = 'modal:ajax:complete';
+```
+
+The handlers receive no arguments. The events are triggered on the `<a>` element which initiated the AJAX modal.
+
+## More advanced AJAX handling
+
+It's a good idea to provide more robust AJAX handling -- error handling, in particular. Instead of accommodating the myriad [`$.ajax` options](http://api.jquery.com/jQuery.ajax/) jQuery provides, jquery-modal makes it possible to directly modify the AJAX request itself.
+
+Simply bypass the default AJAX handling (i.e.: don't use `rel="modal"`)
+
+```html
+<a href="ajax.html" rel="ajax:modal">Click me!</a>
+```
+
+and make your AJAX request in the link's click handler. Note that you need to manually append the new HTML/modal in the `success` callback:
+
+```js
+$('a[rel="ajax:modal"]').click(function(event) {
+
+ $.ajax({
+
+ url: $(this).attr('href'),
+
+ success: function(newHTML, textStatus, jqXHR) {
+ $(newHTML).appendTo('body').modal();
+ },
+
+ error: function(jqXHR, textStatus, errorThrown) {
+ // Handle AJAX errors
+ }
+
+ // More AJAX customization goes here.
+
+ });
+
+ return false;
+});
+```
+
+Note that the AJAX response must be wrapped in a div with class <code>modal</code> when using the second (manual) method.
+
+# Bugs & Feature Requests
+
+### Found a bug? MEH!
+
+
+
+**Just kidding.** Please [create an issue](https://github.com/kylefox/jquery-modal/issues/new) and **include a publicly-accessible demonstration of the bug.** [Dropbox](https://www.dropbox.com) or [JSFiddle](http://jsfiddle.net/) work well for demonstrating reproducable bugs, but you can use anything as long as it's publicly accessible. Your issue is much more likely to be resolved/merged if it includes a fix & pull request.
+
+**Have an idea that improves jquery-modal?** Awesome! Please fork this repository, implement your idea (including documentation, if necessary), and submit a pull request.
+
+I don't use this library as frequently as I used to, so if you want to see a fix/improvement you're best off submitting a pull request. Bugs without a test case and/or improvements without a pull request will be shown no mercy and closed!
+
+# Contributing
+
+## Maintainers Wanted
+
+
+
+This library became more popular and active than I ever expected, and unfortunately I don't have time to maintain it myself.
+
+If you are interested in helping me maintain this library, please let me know — **I would love your help!**
+
+[**Read more about becoming a maintainer »**](https://github.com/kylefox/jquery-modal/issues/170)
+
+_I'd especially like people who would be excited about working towards a brand new **jQuery Modal 2.0**. See my [Proposal for jQuery Modal 2.0](https://github.com/kylefox/jquery-modal/issues/169) for more details & discussion._
+
+## How to contribute
+
+I welcome improvements to this plugin, particularly with:
+
+* Performance improvements
+* Making the code as concise/efficient as possible
+* Bug fixes & browser compatibility
+
+Please fork and send pull requests, or create an [issue](https://github.com/kylefox/jquery-modal/issues). Keep in mind the spirit of this plugin is **minimalism** so I'm very picky about adding _new_ features.
+
+## Tips for development/contributing
+
+* Make sure dependencies are installed: `npm install`
+* After modifying `jquery.modal.js` and/or `jquery.modal.css`, you can optionally regenerate the minified files with `gulp min` and `gulp css` respectively.
+* Make sure you have updated documentation (`README.md` and/or `examples/index.html`) if necessary. **Pull requests without documentation updates will be rejected.**
+* Maintainers should increment version numbers and run `gulp changelog` when cutting a new release.
+
+# Support
+
+Please post a question on [StackOverflow](http://stackoverflow.com/). Commercial support by email is also available — please contact kylefox@gmail.com for rates. Unfortunately I am unable to provide free email support.
+
+# License (MIT)
+
+jQuery Modal is distributed under the [MIT License](Learn more at http://opensource.org/licenses/mit-license.php):
+
+ Copyright (c) 2012 Kyle Fox
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/bower.json b/bower.json
new file mode 100644
index 0000000..62e2d03
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,22 @@
+{
+ "name": "jquery-modal",
+ "main": [
+ "jquery.modal.js",
+ "jquery.modal.css",
+ "close.png",
+ "spinner.gif"
+ ],
+ "homepage": "https://github.com/kylefox/jquery-modal",
+ "authors": [
+ "Kyle Fox <kyle.fox@gmail.com>"
+ ],
+ "description": "A lightweight and easy to use modal plugin for jQuery.",
+ "keywords": [
+ "jquery",
+ "modal"
+ ],
+ "dependencies": {
+ "jquery": "1.8.0 - 3.1.x"
+ },
+ "license": "MIT"
+}
diff --git a/close.sketch b/close.sketch
new file mode 100644
index 0000000..283ea11
--- /dev/null
+++ b/close.sketch
Binary files differ
diff --git a/compositor.json b/compositor.json
new file mode 100644
index 0000000..aa9dc5e
--- /dev/null
+++ b/compositor.json
@@ -0,0 +1,147 @@
+{
+ "name": "kylefox/jquery-modal",
+ "version": "0.1.4",
+ "libraries": {
+ "xv": "^1.1.25"
+ },
+ "title": "jQuery Modal",
+ "branch": "",
+ "style": {
+ "name": "Default",
+ "componentSet": {
+ "nav": "nav/BasicNav",
+ "header": "header/BannerHeader",
+ "article": "article/BasicArticle",
+ "footer": "footer/BasicFooter"
+ },
+ "fontFamily": "-apple-system, BlinkMacSystemFont, sans-serif",
+ "fontWeight": 400,
+ "bold": 600,
+ "lineHeight": 1.5,
+ "typeScale": [
+ 72,
+ 48,
+ 24,
+ 20,
+ 16,
+ 14,
+ 12
+ ],
+ "monospace": "Menlo, monospace",
+ "heading": {
+ "fontFamily": null,
+ "fontStyle": null,
+ "fontWeight": 600,
+ "lineHeight": 1.25,
+ "textTransform": null,
+ "letterSpacing": null
+ },
+ "h0": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "alternativeText": {},
+ "space": [
+ 0,
+ 8,
+ 16,
+ 32,
+ 48,
+ 64,
+ 96
+ ],
+ "layout": {
+ "maxWidth": 1024,
+ "centered": false
+ },
+ "colors": {
+ "text": "#111",
+ "background": "#fff",
+ "primary": "#08e",
+ "secondary": "#059",
+ "highlight": "#e08",
+ "border": "#ddd",
+ "muted": "#eee"
+ },
+ "border": {
+ "width": 1,
+ "radius": 2
+ },
+ "link": {},
+ "button": {
+ "hover": {
+ "boxShadow": "inset 0 0 0 999px rgba(0, 0, 0, .125)"
+ }
+ },
+ "input": {},
+ "body": {
+ "margin": 0
+ },
+ "breakpoints": {
+ "xs": "@media screen and (max-width:40em)",
+ "sm": "@media screen and (min-width:40em)",
+ "md": "@media screen and (min-width:52em)",
+ "lg": "@media screen and (min-width:64em)"
+ }
+ },
+ "content": [
+ {
+ "component": "nav",
+ "links": [
+ {
+ "href": "http://jquerymodal.com/",
+ "text": "Home"
+ },
+ {
+ "href": "https://github.com/kylefox/jquery-modal",
+ "text": "GitHub"
+ },
+ {
+ "href": "https://npmjs.com/package/jquery-modal",
+ "text": "npm"
+ }
+ ]
+ },
+ {
+ "component": "header",
+ "heading": "jquery-modal",
+ "subhead": "The simplest possible modal for jQuery",
+ "children": [
+ {
+ "component": "ui/TweetButton",
+ "text": "jquery-modal: The simplest possible modal for jQuery",
+ "url": "http://jquerymodal.com/"
+ },
+ {
+ "component": "ui/GithubButton",
+ "user": "kylefox",
+ "repo": "jquery-modal"
+ }
+ ],
+ "text": "v0.8.0"
+ },
+ {
+ "component": "article",
+ "metadata": {
+ "source": "github.readme"
+ },
+ "html": "<p>A simple & lightweight method of displaying modal windows with jQuery.</p>\n<p>For quick examples and demos, head to <a href=\"http://jquerymodal.com/\">jquerymodal.com</a>.</p>\n<h1>Why another modal plugin?</h1>\n<p>Most plugins I've found try to do too much, and have specialized ways of handling photo galleries, iframes and video. The resulting HTML & CSS is often bloated and difficult to customize.</p>\n<p>By contrast, this plugin handles the two most common scenarios I run into</p>\n<ul>\n<li>displaying an existing DOM element</li>\n<li>loading a page with AJAX</li>\n</ul>\n<p>and does so with as little HTML & CSS as possible.</p>\n<h1>Installation</h1>\n<p>You can install <a href=\"https://www.npmjs.com/package/jquery-modal\">jquery-modal</a> with npm:</p>\n<p><code>npm install jquery-modal</code></p>\n<p>or with <a href=\"http://bower.io/\">Bower</a>:</p>\n<p><code>bower install jquery-modal</code></p>\n<p>or use the hosted version from <a href=\"https://cdnjs.com/libraries/jquery-modal\">cdnjs</a>:</p>\n<pre><span class=\"hljs-comment\"><!-- Remember to include jQuery :) --></span>\n<span class=\"hljs-tag\"><<span class=\"hljs-name\">script</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"</span>></span><span class=\"undefined\"></span><span class=\"hljs-tag\"></<span class=\"hljs-name\">script</span>></span>\n\n<span class=\"hljs-comment\"><!-- jQuery Modal --></span>\n<span class=\"hljs-tag\"><<span class=\"hljs-name\">script</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">"https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"</span>></span><span class=\"undefined\"></span><span class=\"hljs-tag\"></<span class=\"hljs-name\">script</span>></span>\n<span class=\"hljs-tag\"><<span class=\"hljs-name\">link</span> <span class=\"hljs-attr\">rel</span>=<span class=\"hljs-string\">"stylesheet"</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">"https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css"</span> /></span></pre><p><strong>Using Rails?</strong> Check out the <a href=\"https://github.com/dei79/jquery-modal-rails\">jquery-modal-rails plugin</a>!</p>\n<p><strong>jQuery Requirements:</strong> As of version 0.3.0, jQuery 1.7 is required. If you're using an earlier version of jQuery you can use the <a href=\"https://github.com/kylefox/jquery-modal/tags\">v.0.2.5 tag.</a></p>\n<p><strong>Naming conflict with Bootstrap:</strong> Bootstrap's <a href=\"http://getbootstrap.com/javascript/#modals\">modal</a> uses the same <code>$.modal</code> namespace. If you want to use jquery-modal with Bootstrap, the simplest solution is to manually modify the name of this plugin.</p>\n<h1>Opening</h1>\n<h4>Method 1: Automatically attaching to links</h4>\n<p>The simplest approach is to add <code>rel="modal:open"</code> to your links and use the <code>href</code> attribute to specify what to open in the modal.</p>\n<p>Open an existing DOM element by ID:</p>\n<pre><span class=\"hljs-tag\"><<span class=\"hljs-name\">form</span> <span class=\"hljs-attr\">id</span>=<span class=\"hljs-string\">"login-form"</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">"modal"</span>></span>\n ...\n<span class=\"hljs-tag\"></<span class=\"hljs-name\">form</span>></span>\n\n<span class=\"hljs-tag\"><<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">"#login-form"</span> <span class=\"hljs-attr\">rel</span>=<span class=\"hljs-string\">"modal:open"</span>></span>Login<span class=\"hljs-tag\"></<span class=\"hljs-name\">a</span>></span></pre><p>Load a remote URL with AJAX:</p>\n<pre><span class=\"hljs-tag\"><<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">"login.html"</span> <span class=\"hljs-attr\">rel</span>=<span class=\"hljs-string\">"modal:open"</span>></span>Login<span class=\"hljs-tag\"></<span class=\"hljs-name\">a</span>></span></pre><h4>Method 2: Manually</h4>\n<p>You can manually open a modal by calling the <code>.modal()</code> method on the element:</p>\n<pre><span class=\"hljs-tag\"><<span class=\"hljs-name\">form</span> <span class=\"hljs-attr\">id</span>=<span class=\"hljs-string\">"login-form"</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">"modal"</span>></span>\n ...\n<span class=\"hljs-tag\"></<span class=\"hljs-name\">form</span>></span></pre><pre>$(<span class=\"hljs-string\">'#login-form'</span>).modal();</pre><p>You can also invoke <code>.modal()</code> directly on links:</p>\n<pre><span class=\"hljs-tag\"><<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">"#ex5"</span> <span class=\"hljs-attr\">data-modal</span>></span>Open a DOM element<span class=\"hljs-tag\"></<span class=\"hljs-name\">a</span>></span>\n<span class=\"hljs-tag\"><<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">"ajax.html"</span> <span class=\"hljs-attr\">data-modal</span>></span>Open an AJAX modal<span class=\"hljs-tag\"></<span class=\"hljs-name\">a</span>></span></pre><pre>$(<span class=\"hljs-string\">'a[data-modal]'</span>).click(<span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span>(<span class=\"hljs-params\">event</span>) </span>{\n $(<span class=\"hljs-keyword\">this</span>).modal();\n <span class=\"hljs-keyword\">return</span> <span class=\"hljs-literal\">false</span>;\n});</pre><h3>Compatibility Fallback</h3>\n<p>You can provide a clean fallback for users who have JavaScript disabled by manually attaching the modal via the <code>data-modal</code> attribute. This allows you to write your links pointing to the <code>href</code> as normal (fallback) while enabling modals where JavaScript is enabled.</p>\n<pre><span class=\"hljs-comment\"><!-- By default link takes user to /login.html --></span>\n<span class=\"hljs-tag\"><<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">"/login.html"</span> <span class=\"hljs-attr\">data-modal</span>=<span class=\"hljs-string\">"#login-modal"</span>></span>Login<span class=\"hljs-tag\"></<span class=\"hljs-name\">a</span>></span>\n\n<span class=\"hljs-comment\"><!-- Login modal embedded in page --></span>\n<span class=\"hljs-tag\"><<span class=\"hljs-name\">div</span> <span class=\"hljs-attr\">id</span>=<span class=\"hljs-string\">"login-modal"</span> <span class=\"hljs-attr\">class</span>=<span class=\"hljs-string\">"modal"</span>></span>\n ...\n<span class=\"hljs-tag\"></<span class=\"hljs-name\">div</span>></span>\n\n<span class=\"hljs-comment\"><!-- For browsers with JavaScript, open the modal. --></span>\n<span class=\"hljs-tag\"><<span class=\"hljs-name\">script</span>></span><span class=\"javascript\">\n $(<span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span>(<span class=\"hljs-params\"></span>) </span>{\n $(<span class=\"hljs-string\">'a[data-modal]'</span>).on(<span class=\"hljs-string\">'click'</span>, <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span>(<span class=\"hljs-params\"></span>) </span>{\n $($(<span class=\"hljs-keyword\">this</span>).data(<span class=\"hljs-string\">'modal'</span>)).modal();\n <span class=\"hljs-keyword\">return</span> <span class=\"hljs-literal\">false</span>;\n });\n });\n</span><span class=\"hljs-tag\"></<span class=\"hljs-name\">script</span>></span></pre><h4>Fade Transitions</h4>\n<p>By default the overlay & window appear instantaneously, but you can enable a fade effect by specifying the <code>fadeDuration</code> option.</p>\n<pre>$(<span class=\"hljs-string\">'a.open-modal'</span>).click(<span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span>(<span class=\"hljs-params\">event</span>) </span>{\n $(<span class=\"hljs-keyword\">this</span>).modal({\n <span class=\"hljs-attr\">fadeDuration</span>: <span class=\"hljs-number\">250</span>\n });\n <span class=\"hljs-keyword\">return</span> <span class=\"hljs-literal\">false</span>;\n});</pre><p>This will fade in the overlay and modal over 250 milliseconds <em>simultaneously.</em> If you want the effect of the overlay appearing <em>before</em> the window, you can specify the <code>fadeDelay</code> option. This indicates at what point during the overlay transition the window transition should begin.</p>\n<p>So if you wanted the window to fade in when the overlay's was 80% finished:</p>\n<pre>$(elm).modal({\n <span class=\"hljs-attr\">fadeDuration</span>: <span class=\"hljs-number\">250</span>,\n <span class=\"hljs-attr\">fadeDelay</span>: <span class=\"hljs-number\">0.80</span>\n});</pre><p>Or, if you wanted the window to fade in a few moments after the overlay transition has completely finished:</p>\n<pre>$(elm).modal({\n <span class=\"hljs-attr\">fadeDuration</span>: <span class=\"hljs-number\">250</span>,\n <span class=\"hljs-attr\">fadeDelay</span>: <span class=\"hljs-number\">1.5</span>\n});</pre><p>The <code>fadeDelay</code> option only applies when opening the modal. When closing the modal, both the modal and the overlay fade out simultaneously according to the <code>fadeDuration</code> setting.</p>\n<p>Fading is the only supported transition.</p>\n<h1>Closing</h1>\n<p>Because there can be only one modal active at a single time, there's no need to select which modal to close:</p>\n<pre>$.modal.close();</pre><p>Similar to how links can be automatically bound to open modals, they can be bound to close modals using <code>rel="modal:close"</code>:</p>\n<pre><span class=\"hljs-tag\"><<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">"#close"</span> <span class=\"hljs-attr\">rel</span>=<span class=\"hljs-string\">"modal:close"</span>></span>Close window<span class=\"hljs-tag\"></<span class=\"hljs-name\">a</span>></span></pre><p><em>(Note that modals loaded with AJAX are removed from the DOM when closed).</em></p>\n<h1>Checking current state</h1>\n<ul>\n<li>Use <code>$.modal.isActive()</code> to check if a modal is currently being displayed.</li>\n<li>Use <code>$.modal.getCurrent()</code> to retrieve a reference to the currently active modal instance, if any.</li>\n</ul>\n<h1>Options</h1>\n<p>These are the supported options and their default values:</p>\n<pre>$.modal.defaults = {\n <span class=\"hljs-attr\">closeExisting</span>: <span class=\"hljs-literal\">true</span>, <span class=\"hljs-comment\">// Close existing modals. Set this to false if you need to stack multiple modal instances.</span>\n escapeClose: <span class=\"hljs-literal\">true</span>, <span class=\"hljs-comment\">// Allows the user to close the modal by pressing `ESC`</span>\n clickClose: <span class=\"hljs-literal\">true</span>, <span class=\"hljs-comment\">// Allows the user to close the modal by clicking the overlay</span>\n closeText: <span class=\"hljs-string\">'Close'</span>, <span class=\"hljs-comment\">// Text content for the close <a> tag.</span>\n closeClass: <span class=\"hljs-string\">''</span>, <span class=\"hljs-comment\">// Add additional class(es) to the close <a> tag.</span>\n showClose: <span class=\"hljs-literal\">true</span>, <span class=\"hljs-comment\">// Shows a (X) icon/link in the top-right corner</span>\n modalClass: <span class=\"hljs-string\">"modal"</span>, <span class=\"hljs-comment\">// CSS class added to the element being displayed in the modal.</span>\n blockerClass: <span class=\"hljs-string\">"modal"</span>, <span class=\"hljs-comment\">// CSS class added to the overlay (blocker).</span>\n\n <span class=\"hljs-comment\">// HTML appended to the default spinner during AJAX requests.</span>\n spinnerHtml: <span class=\"hljs-string\">'<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>'</span>,\n\n <span class=\"hljs-attr\">showSpinner</span>: <span class=\"hljs-literal\">true</span>, <span class=\"hljs-comment\">// Enable/disable the default spinner during AJAX requests.</span>\n fadeDuration: <span class=\"hljs-literal\">null</span>, <span class=\"hljs-comment\">// Number of milliseconds the fade transition takes (null means no transition)</span>\n fadeDelay: <span class=\"hljs-number\">1.0</span> <span class=\"hljs-comment\">// Point during the overlay's fade-in that the modal begins to fade in (.5 = 50%, 1.5 = 150%, etc.)</span>\n};</pre><h1>Events</h1>\n<p>The following events are triggered on the modal element at various points in the open/close cycle (see below for AJAX events).</p>\n<pre>$.modal.BEFORE_BLOCK = <span class=\"hljs-string\">'modal:before-block'</span>; <span class=\"hljs-comment\">// Fires just before the overlay (blocker) appears.</span>\n$.modal.BLOCK = <span class=\"hljs-string\">'modal:block'</span>; <span class=\"hljs-comment\">// Fires after the overlay (block) is visible.</span>\n$.modal.BEFORE_OPEN = <span class=\"hljs-string\">'modal:before-open'</span>; <span class=\"hljs-comment\">// Fires just before the modal opens.</span>\n$.modal.OPEN = <span class=\"hljs-string\">'modal:open'</span>; <span class=\"hljs-comment\">// Fires after the modal has finished opening.</span>\n$.modal.BEFORE_CLOSE = <span class=\"hljs-string\">'modal:before-close'</span>; <span class=\"hljs-comment\">// Fires when the modal has been requested to close.</span>\n$.modal.CLOSE = <span class=\"hljs-string\">'modal:close'</span>; <span class=\"hljs-comment\">// Fires when the modal begins closing (including animations).</span>\n$.modal.AFTER_CLOSE = <span class=\"hljs-string\">'modal:after-close'</span>; <span class=\"hljs-comment\">// Fires after the modal has fully closed (including animations).</span></pre><p>The first and only argument passed to these event handlers is the <code>modal</code> object, which has three properties:</p>\n<pre>modal.$elm; <span class=\"hljs-comment\">// Original jQuery object upon which modal() was invoked.</span>\nmodal.options; <span class=\"hljs-comment\">// Options passed to the modal.</span>\nmodal.$blocker; <span class=\"hljs-comment\">// The overlay element.</span></pre><p>So, you could do something like this:</p>\n<pre>$(<span class=\"hljs-string\">'#purchase-form'</span>).on($.modal.BEFORE_CLOSE, <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span>(<span class=\"hljs-params\">event, modal</span>) </span>{\n clear_shopping_cart();\n});</pre><h1>AJAX</h1>\n<h2>Basic support</h2>\n<p>jQuery Modal uses $.get for basic AJAX support. A simple spinner will be displayed by default (if you've included modal.css) and will have the class <code>modal-spinner</code>. If you've set the <code>modalClass</code> option, the spinner will be prefixed with that class name instead.</p>\n<p>You can add text or additional HTML to the spinner with the <code>spinnerHtml</code> option, or disable the spinner entirely by setting <code>showSpinner: false</code>.</p>\n<p>The default spinner is from the excellent <a href=\"http://tobiasahlin.com/spinkit/\">SpinKit</a> by <a href=\"https://twitter.com/tobiasahlin\">Tobias Ahlin</a> 👍</p>\n<h2>Events</h2>\n<p>The following events are triggered when AJAX modals are requested.</p>\n<pre>$.modal.AJAX_SEND = <span class=\"hljs-string\">'modal:ajax:send'</span>;\n$.modal.AJAX_SUCCESS = <span class=\"hljs-string\">'modal:ajax:success'</span>;\n$.modal.AJAX_FAIL = <span class=\"hljs-string\">'modal:ajax:fail'</span>;\n$.modal.AJAX_COMPLETE = <span class=\"hljs-string\">'modal:ajax:complete'</span>;</pre><p>The handlers receive no arguments. The events are triggered on the <code><a></code> element which initiated the AJAX modal.</p>\n<h2>More advanced AJAX handling</h2>\n<p>It's a good idea to provide more robust AJAX handling -- error handling, in particular. Instead of accommodating the myriad <a href=\"http://api.jquery.com/jQuery.ajax/\"><code>$.ajax</code> options</a> jQuery provides, jquery-modal makes it possible to directly modify the AJAX request itself.</p>\n<p>Simply bypass the default AJAX handling (i.e.: don't use <code>rel="modal"</code>)</p>\n<pre><span class=\"hljs-tag\"><<span class=\"hljs-name\">a</span> <span class=\"hljs-attr\">href</span>=<span class=\"hljs-string\">"ajax.html"</span> <span class=\"hljs-attr\">rel</span>=<span class=\"hljs-string\">"ajax:modal"</span>></span>Click me!<span class=\"hljs-tag\"></<span class=\"hljs-name\">a</span>></span></pre><p>and make your AJAX request in the link's click handler. Note that you need to manually append the new HTML/modal in the <code>success</code> callback:</p>\n<pre>$(<span class=\"hljs-string\">'a[rel="ajax:modal"]'</span>).click(<span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span>(<span class=\"hljs-params\">event</span>) </span>{\n\n $.ajax({\n\n <span class=\"hljs-attr\">url</span>: $(<span class=\"hljs-keyword\">this</span>).attr(<span class=\"hljs-string\">'href'</span>),\n\n <span class=\"hljs-attr\">success</span>: <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span>(<span class=\"hljs-params\">newHTML, textStatus, jqXHR</span>) </span>{\n $(newHTML).appendTo(<span class=\"hljs-string\">'body'</span>).modal();\n },\n\n <span class=\"hljs-attr\">error</span>: <span class=\"hljs-function\"><span class=\"hljs-keyword\">function</span>(<span class=\"hljs-params\">jqXHR, textStatus, errorThrown</span>) </span>{\n <span class=\"hljs-comment\">// Handle AJAX errors</span>\n }\n\n <span class=\"hljs-comment\">// More AJAX customization goes here.</span>\n\n });\n\n <span class=\"hljs-keyword\">return</span> <span class=\"hljs-literal\">false</span>;\n});</pre><p>Note that the AJAX response must be wrapped in a div with class <code>modal</code> when using the second (manual) method.</p>\n<h1>Bugs & Feature Requests</h1>\n<h3>Found a bug? MEH!</h3>\n<p><img src=\"http://drops.kylefox.ca/1cqGP+\"></p>\n<p><strong>Just kidding.</strong> Please <a href=\"https://github.com/kylefox/jquery-modal/issues/new\">create an issue</a> and <strong>include a publicly-accessible demonstration of the bug.</strong> <a href=\"https://www.dropbox.com\">Dropbox</a> or <a href=\"http://jsfiddle.net/\">JSFiddle</a> work well for demonstrating reproducable bugs, but you can use anything as long as it's publicly accessible. Your issue is much more likely to be resolved/merged if it includes a fix & pull request.</p>\n<p><strong>Have an idea that improves jquery-modal?</strong> Awesome! Please fork this repository, implement your idea (including documentation, if necessary), and submit a pull request.</p>\n<p>I don't use this library as frequently as I used to, so if you want to see a fix/improvement you're best off submitting a pull request. Bugs without a test case and/or improvements without a pull request will be shown no mercy and closed!</p>\n<h1>Contributing</h1>\n<h2>Maintainers Wanted</h2>\n<p><img src=\"https://img.shields.io/badge/maintainers-wanted-red.svg\"></p>\n<p>This library became more popular and active than I ever expected, and unfortunately I don't have time to maintain it myself.</p>\n<p>If you are interested in helping me maintain this library, please let me know — <strong>I would love your help!</strong></p>\n<p><a href=\"https://github.com/kylefox/jquery-modal/issues/170\"><strong>Read more about becoming a maintainer »</strong></a></p>\n<p><em>I'd especially like people who would be excited about working towards a brand new <strong>jQuery Modal 2.0</strong>. See my <a href=\"https://github.com/kylefox/jquery-modal/issues/169\">Proposal for jQuery Modal 2.0</a> for more details & discussion.</em></p>\n<h2>How to contribute</h2>\n<p>I welcome improvements to this plugin, particularly with:</p>\n<ul>\n<li>Performance improvements</li>\n<li>Making the code as concise/efficient as possible</li>\n<li>Bug fixes & browser compatibility</li>\n</ul>\n<p>Please fork and send pull requests, or create an <a href=\"https://github.com/kylefox/jquery-modal/issues\">issue</a>. Keep in mind the spirit of this plugin is <strong>minimalism</strong> so I'm very picky about adding <em>new</em> features.</p>\n<h2>Tips for development/contributing</h2>\n<ul>\n<li>Make sure dependencies are installed: <code>npm install</code></li>\n<li>After modifying <code>jquery.modal.js</code> and/or <code>jquery.modal.css</code>, you can optionally regenerate the minified files with <code>gulp min</code> and <code>gulp css</code> respectively.</li>\n<li>Make sure you have updated documentation (<code>README.md</code> and/or <code>examples/index.html</code>) if necessary. <strong>Pull requests without documentation updates will be rejected.</strong></li>\n<li>Maintainers should increment version numbers and run <code>gulp changelog</code> when cutting a new release.</li>\n</ul>\n<h1>Support</h1>\n<p>Please post a question on <a href=\"http://stackoverflow.com/\">StackOverflow</a>. Commercial support by email is also available — please contact kylefox@gmail.com for rates. Unfortunately I am unable to provide free email support.</p>\n<h1>License (MIT)</h1>\n<p>jQuery Modal is distributed under the <a>MIT License</a>:</p>\n<pre>Copyright (c) 2012 Kyle Fox\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n"Software"), to deal in the Software without restriction, including\nwithout limitation the rights to <span class=\"hljs-keyword\">use</span>, copy, <span class=\"hljs-keyword\">modify</span>, <span class=\"hljs-keyword\">merge</span>, publish,\n<span class=\"hljs-keyword\">distribute</span>, sublicense, <span class=\"hljs-keyword\">and</span>/<span class=\"hljs-keyword\">or</span> sell copies <span class=\"hljs-keyword\">of</span> the Software, <span class=\"hljs-keyword\">and</span> <span class=\"hljs-keyword\">to</span>\npermit persons <span class=\"hljs-keyword\">to</span> whom the Software <span class=\"hljs-keyword\">is</span> furnished <span class=\"hljs-keyword\">to</span> <span class=\"hljs-keyword\">do</span> so, subject <span class=\"hljs-keyword\">to</span>\nthe <span class=\"hljs-keyword\">following</span> conditions:\n\nThe above copyright <span class=\"hljs-keyword\">notice</span> <span class=\"hljs-keyword\">and</span> this permission <span class=\"hljs-keyword\">notice</span> shall be\nincluded <span class=\"hljs-keyword\">in</span> all copies <span class=\"hljs-keyword\">or</span> substantial portions <span class=\"hljs-keyword\">of</span> the Software.\n\nTHE SOFTWARE <span class=\"hljs-keyword\">IS</span> PROVIDED <span class=\"hljs-string\">"AS IS"</span>, <span class=\"hljs-keyword\">WITHOUT</span> WARRANTY <span class=\"hljs-keyword\">OF</span> <span class=\"hljs-keyword\">ANY</span> KIND,\nEXPRESS <span class=\"hljs-keyword\">OR</span> IMPLIED, <span class=\"hljs-keyword\">INCLUDING</span> BUT <span class=\"hljs-keyword\">NOT</span> LIMITED <span class=\"hljs-keyword\">TO</span> THE WARRANTIES <span class=\"hljs-keyword\">OF</span>\nMERCHANTABILITY, FITNESS <span class=\"hljs-keyword\">FOR</span> A PARTICULAR PURPOSE <span class=\"hljs-keyword\">AND</span>\nNONINFRINGEMENT. <span class=\"hljs-keyword\">IN</span> <span class=\"hljs-keyword\">NO</span> <span class=\"hljs-keyword\">EVENT</span> SHALL THE <span class=\"hljs-keyword\">AUTHORS</span> <span class=\"hljs-keyword\">OR</span> COPYRIGHT HOLDERS BE\nLIABLE <span class=\"hljs-keyword\">FOR</span> <span class=\"hljs-keyword\">ANY</span> CLAIM, DAMAGES <span class=\"hljs-keyword\">OR</span> OTHER LIABILITY, WHETHER <span class=\"hljs-keyword\">IN</span> AN <span class=\"hljs-keyword\">ACTION</span>\n<span class=\"hljs-keyword\">OF</span> CONTRACT, TORT <span class=\"hljs-keyword\">OR</span> OTHERWISE, ARISING <span class=\"hljs-keyword\">FROM</span>, <span class=\"hljs-keyword\">OUT</span> <span class=\"hljs-keyword\">OF</span> <span class=\"hljs-keyword\">OR</span> <span class=\"hljs-keyword\">IN</span> <span class=\"hljs-keyword\">CONNECTION</span>\n<span class=\"hljs-keyword\">WITH</span> THE SOFTWARE <span class=\"hljs-keyword\">OR</span> THE <span class=\"hljs-keyword\">USE</span> <span class=\"hljs-keyword\">OR</span> OTHER DEALINGS <span class=\"hljs-keyword\">IN</span> THE SOFTWARE.</pre>"
+ },
+ {
+ "component": "footer",
+ "links": [
+ {
+ "href": "https://github.com/kylefox/jquery-modal",
+ "text": "GitHub"
+ },
+ {
+ "href": "https://github.com/kylefox",
+ "text": "kylefox"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/examples/ajax.html b/examples/ajax.html
new file mode 100644
index 0000000..a551093
--- /dev/null
+++ b/examples/ajax.html
@@ -0,0 +1,2 @@
+<h1>Hello there!</h1>
+<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
\ No newline at end of file
diff --git a/examples/ajax2.html b/examples/ajax2.html
new file mode 100644
index 0000000..37afb96
--- /dev/null
+++ b/examples/ajax2.html
@@ -0,0 +1,3 @@
+<div class="modal">
+ <p>Second AJAX Example!</p>
+</div>
\ No newline at end of file
diff --git a/examples/highlight/github.css b/examples/highlight/github.css
new file mode 100644
index 0000000..cd4b1cb
--- /dev/null
+++ b/examples/highlight/github.css
@@ -0,0 +1,128 @@
+/*
+
+github.com style (c) Vasily Polovnyov <vast@whiteants.net>
+
+*/
+
+pre code {
+ display: block;
+ color: #000;
+ background: #f8f8ff
+}
+
+pre .comment,
+pre .template_comment,
+pre .diff .header,
+pre .javadoc {
+ color: #998;
+ font-style: italic
+}
+
+pre .keyword,
+pre .css .rule .keyword,
+pre .winutils,
+pre .javascript .title,
+pre .lisp .title,
+pre .subst {
+ color: #000;
+ font-weight: bold
+}
+
+pre .number,
+pre .hexcolor {
+ color: #40a070
+}
+
+pre .string,
+pre .attribute .value,
+pre .phpdoc,
+pre .tex .formula {
+ color: #d14
+}
+
+pre .title,
+pre .id {
+ color: #900;
+ font-weight: bold
+}
+
+pre .javascript .title,
+pre .lisp .title,
+pre .subst {
+ font-weight: normal
+}
+
+pre .class .title,
+pre .tex .command {
+ color: #458;
+ font-weight: bold
+}
+
+pre .tag,
+pre .css .keyword,
+pre .html .keyword,
+pre .tag .title,
+pre .django .tag .keyword {
+ color: #000080;
+ font-weight: normal
+}
+
+pre .attribute,
+pre .variable,
+pre .instancevar,
+pre .lisp .body {
+ color: #008080
+}
+
+pre .regexp {
+ color: #009926
+}
+
+pre .class {
+ color: #458;
+ font-weight: bold
+}
+
+pre .symbol,
+pre .ruby .symbol .string,
+pre .ruby .symbol .keyword,
+pre .ruby .symbol .keymethods,
+pre .lisp .keyword,
+pre .tex .special {
+ color: #990073
+}
+
+pre .builtin,
+pre .built_in,
+pre .lisp .title {
+ color: #0086b3
+}
+
+pre .preprocessor,
+pre .pi,
+pre .doctype,
+pre .shebang,
+pre .cdata {
+ color: #999;
+ font-weight: bold
+}
+
+pre .deletion {
+ background: #fdd
+}
+
+pre .addition {
+ background: #dfd
+}
+
+pre .diff .change {
+ background: #0086b3
+}
+
+pre .chunk {
+ color: #aaa
+}
+
+pre .tex .formula {
+ opacity: 0.5;
+}
diff --git a/examples/highlight/highlight.pack.js b/examples/highlight/highlight.pack.js
new file mode 100644
index 0000000..fb51f00
--- /dev/null
+++ b/examples/highlight/highlight.pack.js
@@ -0,0 +1 @@
+var hljs=new function(){var q={};var a={};function o(c){return c.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function l(t,s){if(!t){return false}for(var c=0;c<t.length;c++){if(t[c]==s){return true}}return false}function e(t,s,c){var u="m"+(t.cI?"i":"")+(c?"g":"");return new RegExp(s,u)}function k(s){for(var c=0;c<s.childNodes.length;c++){node=s.childNodes[c];if(node.nodeName=="CODE"){return node}if(!(node.nodeType==3&&node.nodeValue.match(/\s+/))){return null}}}function i(t){var s="";for(var c=0;c<t.childNodes.length;c++){if(t.childNodes[c].nodeType==3){s+=t.childNodes[c].nodeValue}else{if(t.childNodes[c].nodeName=="BR"){s+="\n"}else{s+=i(t.childNodes[c])}}}return s}function b(u){var s=u.className.split(/\s+/);s=s.concat(u.parentNode.className.split(/\s+/));for(var c=0;c<s.length;c++){var t=s[c].replace(/^language-/,"");if(t=="no-highlight"){throw"No highlight"}if(q[t]){return t}}}function d(c){var s=[];(function(u,v){for(var t=0;t<u.childNodes.length;t++){if(u.childNodes[t].nodeType==3){v+=u.childNodes[t].nodeValue.length}else{if(u.childNodes[t].nodeName=="BR"){v+=1}else{s.push({event:"start",offset:v,node:u.childNodes[t]});v=arguments.callee(u.childNodes[t],v);s.push({event:"stop",offset:v,node:u.childNodes[t]})}}}return v})(c,0);return s}function n(A,B,z){var t=0;var y="";var v=[];function w(){if(A.length&&B.length){if(A[0].offset!=B[0].offset){return(A[0].offset<B[0].offset)?A:B}else{return(A[0].event=="start"&&B[0].event=="stop")?B:A}}else{return A.length?A:B}}function u(F){var G="<"+F.nodeName.toLowerCase();for(var D=0;D<F.attributes.length;D++){var E=F.attributes[D];G+=" "+E.nodeName.toLowerCase();if(E.nodeValue!=undefined){G+='="'+o(E.nodeValue)+'"'}}return G+">"}function C(D){return"</"+D.nodeName.toLowerCase()+">"}while(A.length||B.length){var x=w().splice(0,1)[0];y+=o(z.substr(t,x.offset-t));t=x.offset;if(x.event=="start"){y+=u(x.node);v.push(x.node)}else{if(x.event=="stop"){var s=v.length;do{s--;var c=v[s];y+=C(c)}while(c!=x.node);v.splice(s,1);while(s<v.length){y+=u(v[s]);s++}}}}y+=z.substr(t);return y}function h(K,E){function L(Q,P){Q.sm=[];for(var O=0;O<Q.c.length;O++){for(var N=0;N<P.m.length;N++){if(P.m[N].cN==Q.c[O]){Q.sm[Q.sm.length]=P.m[N]}}}}function A(N,P){if(!P.c){return null}if(!P.sm){L(P,I)}for(var O=0;O<P.sm.length;O++){if(P.sm[O].bR.test(N)){return P.sm[O]}}return null}function x(O,N){if(D[O].e&&D[O].eR.test(N)){return 1}if(D[O].eW){var P=x(O-1,N);return P?P+1:0}return 0}function y(N,O){return O.iR&&O.iR.test(N)}function B(T,R){var P=[];function S(U){if(!l(P,U)){P[P.length]=U}}if(T.c){for(var O=0;O<R.m.length;O++){if(l(T.c,R.m[O].cN)){S(R.m[O].b)}}}var N=D.length-1;do{if(D[N].e){S(D[N].e)}N--}while(D[N+1].eW);if(T.i){S(T.i)}var Q="("+P[0];for(var O=0;O<P.length;O++){Q+="|"+P[O]}Q+=")";return e(R,Q)}function t(P,O){var Q=D[D.length-1];if(!Q.t){Q.t=B(Q,I)}P=P.substr(O);var N=Q.t.exec(P);if(!N){return[P,"",true]}if(N.index==0){return["",N[0],false]}else{return[P.substr(0,N.index),N[0],false]}}function s(R,N){var O=I.cI?N[0].toLowerCase():N[0];for(var Q in R.keywordGroups){if(!R.keywordGroups.hasOwnProperty(Q)){continue}var P=R.keywordGroups[Q].hasOwnProperty(O);if(P){return[Q,P]}}return false}function G(Q,T){if(!T.k||!T.l){return o(Q)}if(!T.lR){var S="("+T.l[0];for(var P=1;P<T.l.length;P++){S+="|"+T.l[P]}S+=")";T.lR=e(I,S,true)}var R="";var U=0;T.lR.lastIndex=0;var O=T.lR.exec(Q);while(O){R+=o(Q.substr(U,O.index-U));var N=s(T,O);if(N){u+=N[1];R+='<span class="'+N[0]+'">'+o(O[0])+"</span>"}else{R+=o(O[0])}U=T.lR.lastIndex;O=T.lR.exec(Q)}R+=o(Q.substr(U,Q.length-U));return R}function M(N,P){if(P.subLanguage&&a[P.subLanguage]){var O=h(P.subLanguage,N);u+=O.keyword_count;C+=O.r;return O.value}else{return G(N,P)}}function J(P,N){var O=P.nM?"":'<span class="'+P.displayClassName+'">';if(P.rB){c+=O;P.buffer=""}else{if(P.eB){c+=o(N)+O;P.buffer=""}else{c+=O;P.buffer=N}}D[D.length]=P}function F(S,O,T){var U=D[D.length-1];if(T){c+=M(U.buffer+S,U);return false}var P=A(O,U);if(P){c+=M(U.buffer+S,U);J(P,O);C+=P.r;return P.rB}var N=x(D.length-1,O);if(N){var R=U.nM?"":"</span>";if(U.rE){c+=M(U.buffer+S,U)+R}else{if(U.eE){c+=M(U.buffer+S,U)+R+o(O)}else{c+=M(U.buffer+S+O,U)+R}}while(N>1){R=D[D.length-2].nM?"":"</span>";c+=R;N--;D.length--}D.length--;D[D.length-1].buffer="";if(U.starts){for(var Q=0;Q<I.m.length;Q++){if(I.m[Q].cN==U.starts){J(I.m[Q],"");break}}}return U.rE}if(y(O,U)){throw"Illegal"}}var I=q[K];var D=[I.dM];var C=0;var u=0;var c="";try{var w=0;I.dM.buffer="";do{var z=t(E,w);var v=F(z[0],z[1],z[2]);w+=z[0].length;if(!v){w+=z[1].length}}while(!z[2]);if(D.length>1){throw"Illegal"}return{r:C,keyword_count:u,value:c}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:o(E)}}else{throw H}}}function j(){for(var s in q){if(!q.hasOwnProperty(s)){continue}var t=q[s];for(var c=0;c<t.m.length;c++){var u=t.m[c];if(u.b){u.bR=e(t,"^"+u.b)}if(u.e){u.eR=e(t,"^"+u.e)}if(u.i){u.iR=e(t,"^(?:"+u.i+")")}t.dM.iR=e(t,"^(?:"+t.dM.i+")");if(u.r==undefined){u.r=1}if(!u.displayClassName){u.displayClassName=u.cN}}}}function g(){function t(w){if(!w.keywordGroups){for(var v in w.k){if(!w.k.hasOwnProperty(v)){continue}if(w.k[v] instanceof Object){w.keywordGroups=w.k}else{w.keywordGroups={keyword:w.k}}break}}}for(var s in q){if(!q.hasOwnProperty(s)){continue}var u=q[s];t(u.dM);for(var c=0;c<u.m.length;c++){t(u.m[c])}}}function f(){if(f.called){return}f.called=true;j();g();a=q}function r(y,C){f();try{var F=i(y);var v=b(y)}catch(z){if(z=="No highlight"){return}}if(v){var B=h(v,F).value}else{var D=0;for(var E in a){if(!a.hasOwnProperty(E)){continue}var t=h(E,F);var c=t.keyword_count+t.r;if(c>D){D=c;var B=t.value;v=E}}}if(B){var x=y.className;if(!x.match(v)){x+=" "+v}var s=d(y);if(s.length){var u=document.createElement("pre");u.innerHTML=B;B=n(s,d(u),F)}if(C){B=B.replace(/^((<[^>]+>|\t)+)/gm,function(G,J,I,H){return J.replace(/\t/g,C)})}var A=document.createElement("div");A.innerHTML='<pre><code class="'+x+'">'+B+"</code></pre>";var w=y.parentNode.parentNode;w.replaceChild(A.firstChild,y.parentNode)}}function m(){if(m.called){return}m.called=true;f();if(arguments.length){for(var c=0;c<arguments.length;c++){if(q[arguments[c]]){a[arguments[c]]=q[arguments[c]]}}}var t=document.getElementsByTagName("pre");for(var c=0;c<t.length;c++){var s=k(t[c]);if(s){r(s,hljs.tabReplace)}}}function p(){var c=arguments;var s=function(){m.apply(null,c)};if(window.addEventListener){window.addEventListener("DOMContentLoaded",s,false);window.addEventListener("load",s,false)}else{if(window.attachEvent){window.attachEvent("onload",s)}else{window.onload=s}}}this.LANGUAGES=q;this.initHighlightingOnLoad=p;this.highlightBlock=r;this.initHighlighting=m;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="\\b(0x[A-Za-z0-9]+|\\d+(\\.\\d+)?)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:["escape"],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:["escape"],r:0};this.BE={cN:"escape",b:"\\\\.",e:"^",nM:true,r:0};this.CLCM={cN:"comment",b:"//",e:"$",r:0};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.CNM={cN:"number",b:this.CNR,e:"^",r:0}}();var initHighlightingOnLoad=hljs.initHighlightingOnLoad;hljs.XML_COMMENT={cN:"comment",b:"<!--",e:"-->"};hljs.XML_ATTR={cN:"attribute",b:"\\s[A-Za-z0-9\\._:-]+=",e:"^",c:["value"]};hljs.XML_VALUE_QUOT={cN:"value",b:'"',e:'"'};hljs.XML_VALUE_APOS={cN:"value",b:"'",e:"'"};hljs.LANGUAGES.xml={dM:{c:["pi","comment","cdata","tag"]},cI:true,m:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},hljs.XML_COMMENT,{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>"},{cN:"tag",b:"</?",e:">",c:["title","tag_internal"],r:1.5},{cN:"title",b:"[A-Za-z0-9\\._:-]+",e:"^",r:0},{cN:"tag_internal",b:"^",eW:true,nM:true,c:["attribute"],r:0,i:"[\\+\\.]"},hljs.XML_ATTR,hljs.XML_VALUE_QUOT,hljs.XML_VALUE_APOS]};hljs.HTML_TAGS={code:1,kbd:1,font:1,noscript:1,style:1,img:1,title:1,menu:1,tt:1,tr:1,param:1,li:1,tfoot:1,th:1,input:1,td:1,dl:1,blockquote:1,fieldset:1,big:1,dd:1,abbr:1,optgroup:1,dt:1,button:1,isindex:1,p:1,small:1,div:1,dir:1,em:1,frame:1,meta:1,sub:1,bdo:1,label:1,acronym:1,sup:1,body:1,xml:1,basefont:1,base:1,br:1,address:1,strong:1,legend:1,ol:1,script:1,caption:1,s:1,col:1,h2:1,h3:1,h1:1,h6:1,h4:1,h5:1,table:1,select:1,noframes:1,span:1,area:1,dfn:1,strike:1,cite:1,thead:1,head:1,option:1,form:1,hr:1,"var":1,link:1,b:1,colgroup:1,ul:1,applet:1,del:1,iframe:1,pre:1,frameset:1,ins:1,tbody:1,html:1,samp:1,map:1,object:1,a:1,xmlns:1,center:1,textarea:1,i:1,q:1,u:1};hljs.HTML_DOCTYPE={cN:"doctype",b:"<!DOCTYPE",e:">",r:10};hljs.HTML_ATTR={cN:"attribute",b:"\\s[a-zA-Z\\:_-]+=",e:"^",c:["value"]};hljs.HTML_SHORT_ATTR={cN:"attribute",b:" [a-zA-Z]+",e:"^"};hljs.HTML_VALUE={cN:"value",b:"[a-zA-Z0-9]+",e:"^"};hljs.LANGUAGES.html={dM:{c:["tag","comment","doctype","vbscript"]},cI:true,m:[hljs.XML_COMMENT,hljs.HTML_DOCTYPE,{cN:"tag",l:[hljs.IR],k:hljs.HTML_TAGS,b:"<style",e:">",c:["attribute"],i:"[\\+\\.]",starts:"css"},{cN:"tag",l:[hljs.IR],k:hljs.HTML_TAGS,b:"<script",e:">",c:["attribute"],i:"[\\+\\.]",starts:"javascript"},{cN:"tag",l:[hljs.IR],k:hljs.HTML_TAGS,b:"<[A-Za-z/]",e:">",c:["attribute"],i:"[\\+\\.]"},{cN:"css",e:"</style>",rE:true,subLanguage:"css"},{cN:"javascript",e:"<\/script>",rE:true,subLanguage:"javascript"},hljs.HTML_ATTR,hljs.HTML_SHORT_ATTR,hljs.XML_VALUE_QUOT,hljs.XML_VALUE_APOS,hljs.HTML_VALUE,{cN:"vbscript",b:"<%",e:"%>",subLanguage:"vbscript"}]};hljs.LANGUAGES.javascript={dM:{l:[hljs.UIR],c:["string","comment","number","regexp_container","function"],k:{keyword:{"in":1,"if":1,"for":1,"while":1,"finally":1,"var":1,"new":1,"function":1,"do":1,"return":1,"void":1,"else":1,"break":1,"catch":1,"instanceof":1,"with":1,"throw":1,"case":1,"default":1,"try":1,"this":1,"switch":1,"continue":1,"typeof":1,"delete":1},literal:{"true":1,"false":1,"null":1}}},m:[hljs.CLCM,hljs.CBLCLM,hljs.CNM,hljs.ASM,hljs.QSM,hljs.BE,{cN:"regexp_container",b:"("+hljs.RSR+"|case|return|throw)\\s*",e:"^",nM:true,l:[hljs.IR],k:{"return":1,"throw":1,"case":1},c:["comment","regexp"],r:0},{cN:"regexp",b:"/.*?[^\\\\/]/[gim]*",e:"^"},{cN:"function",b:"\\bfunction\\b",e:"{",l:[hljs.UIR],k:{"function":1},c:["title","params"]},{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*",e:"^"},{cN:"params",b:"\\(",e:"\\)",c:["string","comment"]}]};hljs.LANGUAGES.css={dM:{c:["at_rule","id","class","attr_selector","pseudo","rules","comment"],k:hljs.HTML_TAGS,l:[hljs.IR],i:"="},cI:true,m:[{cN:"at_rule",b:"@",e:"[{;]",eE:true,l:[hljs.IR],k:{"import":1,page:1,media:1,charset:1,"font-face":1},c:["function","string","number","pseudo"]},{cN:"id",b:"\\#[A-Za-z0-9_-]+",e:"^"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",e:"^",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+",e:"^"},{cN:"rules",b:"{",e:"}",c:["rule","comment"],i:"[^\\s]"},{cN:"rule",b:"[A-Z\\_\\.\\-]+\\s*:",e:";",eW:true,l:["[A-Za-z-]+"],k:{"play-during":1,"counter-reset":1,"counter-increment":1,"min-height":1,quotes:1,"border-top":1,pitch:1,font:1,pause:1,"list-style-image":1,"border-width":1,cue:1,"outline-width":1,"border-left":1,elevation:1,richness:1,"speech-rate":1,"border-bottom":1,"border-spacing":1,background:1,"list-style-type":1,"text-align":1,"page-break-inside":1,orphans:1,"page-break-before":1,"text-transform":1,"line-height":1,"padding-left":1,"font-size":1,right:1,"word-spacing":1,"padding-top":1,"outline-style":1,bottom:1,content:1,"border-right-style":1,"padding-right":1,"border-left-style":1,"voice-family":1,"background-color":1,"border-bottom-color":1,"outline-color":1,"unicode-bidi":1,"max-width":1,"font-family":1,"caption-side":1,"border-right-width":1,"pause-before":1,"border-top-style":1,color:1,"border-collapse":1,"border-bottom-width":1,"float":1,height:1,"max-height":1,"margin-right":1,"border-top-width":1,speak:1,"speak-header":1,top:1,"cue-before":1,"min-width":1,width:1,"font-variant":1,"border-top-color":1,"background-position":1,"empty-cells":1,direction:1,"border-right":1,visibility:1,padding:1,"border-style":1,"background-attachment":1,overflow:1,"border-bottom-style":1,cursor:1,margin:1,display:1,"border-left-width":1,"letter-spacing":1,"vertical-align":1,clip:1,"border-color":1,"list-style":1,"padding-bottom":1,"pause-after":1,"speak-numeral":1,"margin-left":1,widows:1,border:1,"font-style":1,"border-left-color":1,"pitch-range":1,"background-repeat":1,"table-layout":1,"margin-bottom":1,"speak-punctuation":1,"font-weight":1,"border-right-color":1,"page-break-after":1,position:1,"white-space":1,"text-indent":1,"background-image":1,volume:1,stress:1,outline:1,clear:1,"z-index":1,"text-decoration":1,"margin-top":1,azimuth:1,"cue-after":1,left:1,"list-style-position":1},c:["value"]},hljs.CBLCLM,{cN:"value",b:"^",eW:true,eE:true,c:["function","number","hexcolor","string","important","comment"]},{cN:"number",b:hljs.NR,e:"^"},{cN:"hexcolor",b:"\\#[0-9A-F]+",e:"^"},{cN:"function",b:hljs.IR+"\\(",e:"\\)",c:["params"]},{cN:"params",b:"^",eW:true,eE:true,c:["number","string"]},{cN:"important",b:"!important",e:"^"},hljs.ASM,hljs.QSM]};
\ No newline at end of file
diff --git a/examples/index.html b/examples/index.html
new file mode 100644
index 0000000..ae9bef0
--- /dev/null
+++ b/examples/index.html
@@ -0,0 +1,563 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width">
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
+
+ <script src="../jquery.modal.js" type="text/javascript" charset="utf-8"></script>
+ <link rel="stylesheet" href="../jquery.modal.css" type="text/css" media="screen" />
+
+ <script src="highlight/highlight.pack.js" type="text/javascript" charset="utf-8"></script>
+ <script type="text/javascript" charset="utf-8"> hljs.initHighlightingOnLoad(); </script>
+ <script async defer src="https://buttons.github.io/buttons.js"></script>
+ <link rel="stylesheet" href="highlight/github.css" type="text/css" media="screen" />
+ <link href="https://fonts.googleapis.com/css?family=Nunito:400,400i,700,800" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/css?family=Fira+Mono:400" rel="stylesheet">
+ <style type="text/css" media="screen">
+ html {
+ font-size: 18px;
+ }
+
+ body {
+ font-weight: 400;
+ font-family: "Nunito", "Helvetica Neue", arial, sans-serif;
+ line-height: 1.666;
+ -webkit-font-smoothing: antialiased;
+ color: #5e6c76;
+ margin: 0;
+ padding: 10px 0 0 0;
+ }
+
+ .band {
+ background-image: linear-gradient(to right, #2a27a8 0%,#8c50bc 50%,#fc6e6c 100%);
+ height: 10px;
+ top: 0;
+ right: 0;
+ left: 0;
+ position: fixed;
+ }
+
+ .wrapper {
+ padding: 2em 20px;
+ max-width: 900px;
+ margin: 0 auto;
+ }
+
+ small { color: #aaa; }
+ h1,h2,h3,h4 { color: #404a50; font-weight: 800; font-size: 1.75em; line-height: 1.1; margin: 0 0 1.5rem 0; }
+ h2 a { color: #cad1d5; border: none; }
+ h2 a:hover { color: #fa0065; }
+ a { color: #fa0065; font-weight: 700; transition-duration: .2s; text-decoration: none; border-bottom: 2px solid transparent; }
+ a:hover { color: #22272a; border-color: #22272a; }
+ p, ul, ol, pre { margin: 0 auto 1.5rem auto; }
+ p code, li code {color: #000080; font-size: .9em; }
+ pre { font-size: 14px; line-height: 2; }
+ pre code { overflow: scroll; padding: 1em; border-radius: 4px; background: #f9fafb; color: #475359; }
+ hr { height: 3px; background: #f0f2f3; border: none; margin: 3rem 0; border-radius: 3px; }
+ table {width:100%;border-collapse:collapse;}
+ td { border: 1px solid #eee; padding: 15px; }
+ td pre { margin: 0; }
+ code { font-family: 'fira mono', monospace; }
+ a.btn {
+ color: #fff;
+ background: #FF0066;
+ padding: .5rem 1rem;
+ display: inline-block;
+ border-radius: 4px;
+ transition-duration: .25s;
+ border: none;
+ font-size: 14px;
+ }
+ a.btn:hover {
+ background: #22272a;
+ }
+
+ .header h1 {
+ margin: 1rem 0 .5rem 0;
+ }
+
+ .header iframe {
+ margin-bottom: 2rem;
+ }
+
+ .header p {
+ margin: 0 0 .5rem 0;
+ font-size: 1.25rem;
+ }
+
+ .header ul {
+ list-style-type: none;
+ margin-right: 0;
+ padding: 0;
+ line-height: 2;
+ }
+
+ .header ul li:before {
+ content: '\2714';
+ margin-right: .5em;
+ color: #94be47;
+ font-size: .75em;
+ }
+
+ /* Example 2 (login form) */
+ .login_form.modal {
+ border-radius: 0;
+ line-height: 18px;
+ padding: 0;
+ font-family: "Lucida Grande", Verdana, sans-serif;
+ }
+
+ .login_form h3 {
+ margin: 0;
+ padding: 10px;
+ color: #fff;
+ font-size: 14px;
+ background: -moz-linear-gradient(top, #2e5764, #1e3d47);
+ background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #1e3d47),color-stop(1, #2e5764));
+ }
+
+ .login_form.modal p { padding: 20px 30px; border-bottom: 1px solid #ddd; margin: 0;
+ background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #eee),color-stop(1, #fff));
+ overflow: hidden;
+ }
+ .login_form.modal p:last-child { border: none; }
+ .login_form.modal p label { float: left; font-weight: bold; color: #333; font-size: 13px; width: 110px; line-height: 22px; }
+ .login_form.modal p input[type="text"],
+ .login_form.modal p input[type="password"] {
+ font: normal 12px/18px "Lucida Grande", Verdana;
+ padding: 3px;
+ border: 1px solid #ddd;
+ width: 200px;
+ }
+
+ .part {
+ display: none;
+ }
+
+ .modal p { margin: 1em 0; }
+ .modal a.close-modal { border: none; }
+
+ @media(max-width: 600px) {
+ html {
+ font-size: 14px;
+ }
+ h2 a { display: block; margin-bottom: 0.5em; }
+ pre { font-size: 11px; line-height: 1.5; }
+ pre code { padding: 5px; }
+ a.btn { display: block; text-align: center; padding: 1rem; }
+ }
+
+ </style>
+ <title>jQuery Modal</title>
+ <meta name="description" content="jQuery Modal is the easiest way to display modal windows with jQuery. Built by Kyle Fox.">
+
+ <link rel="apple-touch-icon" sizes="57x57" href="https://kylefox.ca/apple-touch-icon-57x57.png">
+ <link rel="apple-touch-icon" sizes="114x114" href="https://kylefox.ca/apple-touch-icon-114x114.png">
+ <link rel="apple-touch-icon" sizes="72x72" href="https://kylefox.ca/apple-touch-icon-72x72.png">
+ <link rel="apple-touch-icon" sizes="144x144" href="https://kylefox.ca/apple-touch-icon-144x144.png">
+ <link rel="apple-touch-icon" sizes="60x60" href="https://kylefox.ca/apple-touch-icon-60x60.png">
+ <link rel="apple-touch-icon" sizes="120x120" href="https://kylefox.ca/apple-touch-icon-120x120.png">
+ <link rel="apple-touch-icon" sizes="76x76" href="https://kylefox.ca/apple-touch-icon-76x76.png">
+ <link rel="apple-touch-icon" sizes="152x152" href="https://kylefox.ca/apple-touch-icon-152x152.png">
+ <link rel="icon" type="image/png" href="https://kylefox.ca/favicon-196x196.png" sizes="196x196">
+ <link rel="icon" type="image/png" href="https://kylefox.ca/favicon-160x160.png" sizes="160x160">
+ <link rel="icon" type="image/png" href="https://kylefox.ca/favicon-96x96.png" sizes="96x96">
+ <link rel="icon" type="image/png" href="https://kylefox.ca/favicon-16x16.png" sizes="16x16">
+ <link rel="icon" type="image/png" href="https://kylefox.ca/favicon-32x32.png" sizes="32x32">
+ <meta name="msapplication-TileColor" content="#f0f0f0">
+ <meta name="msapplication-TileImage" content="https://kylefox.ca/mstile-144x144.png">
+
+</head>
+<body>
+ <div class="band"></div>
+ <div class="wrapper">
+
+<div class="header">
+ <h1>jQuery Modal</h1>
+ <p class="sub">The simplest modal you ever did see.</p>
+ <a class="github-button" href="https://github.com/kylefox/jquery-modal" data-size="large" data-show-count="true" aria-label="Star kylefox/jquery-modal on GitHub">Star</a>
+
+ <ul>
+ <li>Automatic binding using HTML semantics</li>
+ <li>No images & light-weight <small>(about 1k minified)</small></li>
+ <li>Simple markup makes it easy to style</li>
+ <li>Attach custom behaviour using <a href="http://api.jquery.com/category/events/">jQuery events</a></li>
+ <li>Close with click or ESC key</li>
+ <li>Built by <a href="https://twitter.com/kylefox" target="_blank">@kylefox</a> 🍸</li>
+ </ul>
+</div>
+
+<hr>
+
+<h2 id="install"><a href="#install">#</a> Install</h2>
+
+<p>The simplest method is to use the hosted version from <a href="https://cdnjs.com/libraries/jquery-modal">cdnjs</a>:</p>
+
+<pre><code><!-- Remember to include jQuery :) -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
+
+<!-- jQuery Modal -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css" /></code></pre>
+
+<p>Refer to the <a href="https://github.com/kylefox/jquery-modal#installation">README</a> for more installation options.</p>
+
+<hr />
+
+<h2 id="example-1"><a href="#example-1">#</a> Example 1: Open & Close with links</h2>
+<ol>
+ <li>Embed modal HTML in document</li>
+ <li>Create a link with <code>rel="modal:open"</code> and set the <code>href</code> attribute to the modal's DOM id.</li>
+</ol>
+<pre><code><!-- Modal HTML embedded directly into document -->
+<div id="ex1" class="modal">
+ <p>Thanks for clicking. That felt good.</p>
+ <a href="#" rel="modal:close">Close</a>
+</div>
+
+<!-- Link to open the modal -->
+<p><a href="#ex1" rel="modal:open">Open Modal</a></p></code></pre>
+
+<a class="btn" href="#ex1" rel="modal:open">Open Modal</a>
+
+<div class="modal" id="ex1">
+ <p>Thanks for clicking. That felt good. <br />Click <a href="#" rel="modal:close">close</a>, click the overlay, or press ESC</p>
+</div>
+
+
+<hr />
+
+<h2 id="example-2"><a href="#example-2">#</a> Example 2: styled login form & events</h2>
+
+<p>This example demonstrates how visually customizable the modal is.</p>
+
+<a class="btn" href="#ex2" rel="modal:open">Open Modal</a>
+
+<!-- Modal HTML embedded directly into document -->
+<form action="" class="login_form modal" id="ex2" style="display:none;">
+ <h3>Please login to continue</h3>
+ <p><label>Username:</label><input type="text" /></p>
+ <p><label>Password:</label><input type="password" /></p>
+ <p><input type="submit" value="Login" /></p>
+</form>
+
+<hr />
+
+<h2 id="example-3"><a href="#example-3">#</a> Example 3: adjusting to content</h2>
+<p>This example shows how modals are centered automatically. It also demonstrates how a vertical scrollbar appears whenever the modal content overflows.</p>
+<div id="ex3" class="modal">
+ <p><a id="more" href="#more">More!</a></p>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
+</div>
+
+<a class="btn" href="#ex3" rel="modal:open">Open Modal</a>
+
+<hr />
+
+<h2 id="example-4"><a href="#example-4">#</a> Example 4: AJAX</h2>
+
+<p>Use <code>rel="modal:open"</code> to automatically load the page contents into a modal via AJAX:</p>
+
+<pre><code><a href="ajax.html" rel="modal:open">example</a></code></pre>
+
+<p><a class="btn" href="ajax.html" rel="modal:open">Open Modal</a></p>
+
+<p>You can also manually load AJAX pages into a modal. Note that the AJAX response must be wrapped in a div with class <code>modal</code>:</p>
+
+<pre><code><!-- Normal link --><br/><a href="ajax.html" id="manual-ajax">second example</a></code></pre>
+
+<pre><code>// Open modal in AJAX callback
+$('#manual-ajax').click(function(event) {
+ event.preventDefault();
+ this.blur(); // Manually remove focus from clicked link.
+ $.get(this.href, function(html) {
+ $(html).appendTo('body').modal();
+ });
+});</code></pre>
+
+<pre><code><!-- AJAX response must be wrapped in the modal's root class. --><br/><div class="modal"><br/> <p>Second AJAX Example!</p><br/></div></pre></code>
+
+<a class="btn" href="ajax2.html" id="manual-ajax">Open Modal</a>
+
+<hr />
+
+<h2 id="example-5"><a href="#example-5">#</a> Example 5: the un-closable window</h2>
+
+<p>This demonstrates how to disable the default methods of closing the modal.</p>
+
+<pre><code> $("#sticky").modal({
+ escapeClose: false,
+ clickClose: false,
+ showClose: false
+});</code></pre>
+
+<a class="btn" href="#ex5">Open Modal</a>
+
+<div id="ex5" class="modal">
+ <p>If you do this, be sure to provide the user with an alternate method of <a href="#" rel="modal:close">closing the window.</a></p>
+</div>
+
+<hr />
+
+<h2 id="example-6"><a href="#example-6">#</a> Example 6: Multiple Modals</h2>
+
+<p>By default, only one modal can be open at a time. If you open a new modal while an existing modal is open, the existing modal is closed first.</p>
+
+<p><a class="btn" href="#ex6-1" rel="modal:open">Open Modals</a>
+
+</p>
+ However, if you need to stack multiple modals at the same time, just set the <code>closeExisting</code> option to <code>false</code>.
+</p>
+
+<pre><code>
+$('#sub-modal').modal({
+ closeExisting: false
+});
+</pre></code>
+
+<a class="btn" href="#ex6-1b" rel="modal:open">Open Modals</a>
+
+<div class="modal" id="ex6-1" style="display:none;">
+ <p>I'm the first modal. <a href="#ex6-2" rel="modal:open">Open second modal...</a></p>
+</div>
+
+<div class="modal" id="ex6-2" style="display:none;">
+ <p>I'm the second modal. <a href="#ex6-3" rel="modal:open">Open third modal...</a></p>
+</div>
+
+<div class="modal" id="ex6-3" style="display:none;">
+ <p>I'm the third modal. You get the idea.</p>
+</div>
+
+<div class="modal" id="ex6-1b" style="display:none;">
+ <p>I'm the first modal. <a href="#ex6-2b">Open second modal...</a></p>
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+</div>
+
+<div class="modal" id="ex6-2b" style="display:none;">
+ <p>I'm the second modal. <a href="#ex6-3b">Open third modal...</a></p>
+ <p>Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+</div>
+
+<div class="modal" id="ex6-3b" style="display:none;">
+ <p>I'm the third modal. You get the idea.</p>
+</div>
+
+<hr />
+
+<h2 id="example-7"><a href="#example-7">#</a> Example 7: Fade Transitions</h2>
+
+<p>You can achieve a simple fade effect by specifying the <code>fadeDuration</code> option.</p>
+
+<pre><code> $("#fade").modal({
+ fadeDuration: 100
+});</code></pre>
+
+<p><a class="btn" href="#ex7">Open Modal</a></p>
+
+<p>You can also use <code>fadeDelay</code> to control the point during the overlay's fade in at which the modal fades in. For example, to fade in the modal when the overlay transition is 50% complete:</p>
+
+<pre><code> $("#fade").modal({
+ fadeDuration: 1000,
+ fadeDelay: 0.50
+});</code></pre>
+
+<p><a class="btn" href="#ex8">Open Modal</a></p>
+
+<p>
+ The default value is <code>1.0</code>, meaning the window transition begins once the overlay transition has finished.
+ Values greater than <code>1.0</code> mean there is a delay between the completed overlay transition and the start of the window transition:</p>
+
+<pre><code> $("#fade").modal({
+ fadeDuration: 1000,
+ fadeDelay: 1.75 // Will fade in 750ms after the overlay finishes.
+});</code></pre>
+
+<p><a class="btn" href="#ex9">Open Modal</a></p>
+
+<p><small>Tip: set <code>fadeDelay: 0</code> to have the overlay and window fade in simultaneously.</small></p>
+
+<p>In the spirit of keeping this library small, fading is the only supported transition. When the modal is closed, both the overal and window transition out simultaneously.</p>
+
+<div id="ex7" class="modal">
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
+ proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+</div>
+
+<div id="ex8" class="modal">
+ <p>This modal starts fading in once the overlay is 50% faded in.</p>
+</div>
+
+<div id="ex9" class="modal">
+ <p>This modal starts fading in well after the overlay has finished transitioning.</p>
+</div>
+
+<hr/>
+
+<h2 id="example-8"><a href="#example-8">#</a> Example 8: Custom Class for Close Button</h2>
+<p>
+ This example demonstrates how to add extra classes to the close button (for custom styles for the close button):
+</p>
+
+<pre><code> $("#custom-close").modal({
+ closeClass: 'icon-remove',
+ closeText: '!'
+});</code></pre>
+<p>And then of course your custom CSS</p>
+<pre><code>.modal a.close-modal[class*="icon-"] {
+ top: -10px;
+ right: -10px;
+ width: 20px;
+ height: 20px;
+ color: #fff;
+ line-height: 1.25;
+ text-align: center;
+ text-decoration: none;
+ text-indent: 0;
+ background: #900;
+ border: 2px solid #fff;
+ -webkit-border-radius: 26px;
+ -moz-border-radius: 26px;
+ -o-border-radius: 26px;
+ -ms-border-radius: 26px;
+ -moz-box-shadow: 1px 1px 5px rgba(0,0,0,0.5);
+ -webkit-box-shadow: 1px 1px 5px rgba(0,0,0,0.5);
+ box-shadow: 1px 1px 5px rgba(0,0,0,0.5);
+}</code></pre>
+
+<a class="btn" href="#ex10">Open Modal</a>
+
+<div id="ex10" class="modal">
+ <p>This modal has a fancy-shmancy close button.</p>
+</div>
+
+<style type="text/css">
+ .modal a.close-modal[class*="icon-"] {
+ top: -10px;
+ right: -10px;
+ width: 20px;
+ height: 20px;
+ color: #fff;
+ line-height: 1.25;
+ text-align: center;
+ text-decoration: none;
+ text-indent: 0;
+ background: #900;
+ border: 2px solid #fff;
+ -webkit-border-radius: 26px;
+ -moz-border-radius: 26px;
+ -o-border-radius: 26px;
+ -ms-border-radius: 26px;
+ -moz-box-shadow: 1px 1px 5px rgba(0,0,0,0.5);
+ -webkit-box-shadow: 1px 1px 5px rgba(0,0,0,0.5);
+ box-shadow: 1px 1px 5px rgba(0,0,0,0.5);
+ }
+</style>
+
+<script type="text/javascript" charset="utf-8">
+ $(function() {
+
+ function log_modal_event(event, modal) {
+ if(typeof console != 'undefined' && console.log) console.log("[event] " + event.type);
+ };
+
+ $(document).on($.modal.BEFORE_BLOCK, log_modal_event);
+ $(document).on($.modal.BLOCK, log_modal_event);
+ $(document).on($.modal.BEFORE_OPEN, log_modal_event);
+ $(document).on($.modal.OPEN, log_modal_event);
+ $(document).on($.modal.BEFORE_CLOSE, log_modal_event);
+ $(document).on($.modal.CLOSE, log_modal_event);
+ $(document).on($.modal.AFTER_CLOSE, log_modal_event);
+ $(document).on($.modal.AJAX_SEND, log_modal_event);
+ $(document).on($.modal.AJAX_SUCCESS, log_modal_event);
+ $(document).on($.modal.AJAX_COMPLETE, log_modal_event);
+
+ $('#more').click(function() {
+ $(this).parent().after($(this).parent().next().clone());
+ return false;
+ });
+
+ $('#manual-ajax').click(function(event) {
+ event.preventDefault();
+ this.blur();
+ $.get(this.href, function(html) {
+ $(html).appendTo('body').modal();
+ });
+ });
+
+ $('a[href="#ex5"]').click(function(event) {
+ event.preventDefault();
+ $(this).modal({
+ escapeClose: false,
+ clickClose: false,
+ showClose: false
+ });
+ });
+
+ $('a[href="#ex6-2b"],a[href="#ex6-3b"]').click(function(event) {
+ event.preventDefault();
+ $(this).modal({
+ closeExisting: false
+ });
+ });
+
+ $('a[href="#ex7"]').click(function(event) {
+ event.preventDefault();
+ $(this).modal({
+ fadeDuration: 250
+ });
+ });
+
+ $('a[href="#ex8"]').click(function(event) {
+ event.preventDefault();
+ $(this).modal({
+ fadeDuration: 1000,
+ fadeDelay: 0.50
+ });
+ });
+
+ $('a[href="#ex9"]').click(function(event) {
+ event.preventDefault();
+ $(this).modal({
+ fadeDuration: 1000,
+ fadeDelay: 1.75
+ });
+ });
+
+ $('a[href="#ex10"]').click(function(event){
+ event.preventDefault();
+ $(this).modal({
+ closeClass: 'icon-remove',
+ closeText: '!'
+ });
+ });
+
+ });
+</script>
+
+<script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-1701128-22', 'auto');
+ ga('send', 'pageview');
+
+</script>
+
+</div>
+</body>
+</html>
diff --git a/gulpfile.js b/gulpfile.js
new file mode 100644
index 0000000..fe3cc4e
--- /dev/null
+++ b/gulpfile.js
@@ -0,0 +1,25 @@
+var gulp = require('gulp');
+var uglify = require("gulp-uglify");
+var uglifycss = require("gulp-uglifycss");
+var rename = require('gulp-rename');
+var changelog = require('gulp-conventional-changelog');
+
+gulp.task('min', function() {
+ gulp.src('jquery.modal.js')
+ .pipe(uglify({preserveComments: 'license'}))
+ .pipe(rename('jquery.modal.min.js'))
+ .pipe(gulp.dest('.'));
+});
+
+gulp.task('css', function() {
+ gulp.src('jquery.modal.css')
+ .pipe(uglifycss())
+ .pipe(rename('jquery.modal.min.css'))
+ .pipe(gulp.dest('.'));
+});
+
+gulp.task('changelog', function() {
+ gulp.src('CHANGELOG.md')
+ .pipe(changelog())
+ .pipe(gulp.dest('.'));
+});
diff --git a/jquery.modal.css b/jquery.modal.css
new file mode 100644
index 0000000..9392b7f
--- /dev/null
+++ b/jquery.modal.css
@@ -0,0 +1,113 @@
+.blocker {
+ position: fixed;
+ top: 0; right: 0; bottom: 0; left: 0;
+ width: 100%; height: 100%;
+ overflow: auto;
+ z-index: 1;
+ padding: 20px;
+ box-sizing: border-box;
+ background-color: rgb(0,0,0);
+ background-color: rgba(0,0,0,0.75);
+ text-align: center;
+}
+.blocker:before{
+ content: "";
+ display: inline-block;
+ height: 100%;
+ vertical-align: middle;
+ margin-right: -0.05em;
+}
+.blocker.behind {
+ background-color: transparent;
+}
+.modal {
+ display: none;
+ vertical-align: middle;
+ position: relative;
+ z-index: 2;
+ max-width: 500px;
+ box-sizing: border-box;
+ width: 90%;
+ background: #fff;
+ padding: 15px 30px;
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ -o-border-radius: 8px;
+ -ms-border-radius: 8px;
+ border-radius: 8px;
+ -webkit-box-shadow: 0 0 10px #000;
+ -moz-box-shadow: 0 0 10px #000;
+ -o-box-shadow: 0 0 10px #000;
+ -ms-box-shadow: 0 0 10px #000;
+ box-shadow: 0 0 10px #000;
+ text-align: left;
+}
+
+.modal a.close-modal {
+ position: absolute;
+ top: -12.5px;
+ right: -12.5px;
+ display: block;
+ width: 30px;
+ height: 30px;
+ text-indent: -9999px;
+ background-size: contain;
+ background-repeat: no-repeat;
+ background-position: center center;
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAA3hJREFUaAXlm8+K00Acx7MiCIJH/yw+gA9g25O49SL4AO3Bp1jw5NvktC+wF88qevK4BU97EmzxUBCEolK/n5gp3W6TTJPfpNPNF37MNsl85/vN/DaTmU6PknC4K+pniqeKJ3k8UnkvDxXJzzy+q/yaxxeVHxW/FNHjgRSeKt4rFoplzaAuHHDBGR2eS9G54reirsmienDCTRt7xwsp+KAoEmt9nLaGitZxrBbPFNaGfPloGw2t4JVamSt8xYW6Dg1oCYo3Yv+rCGViV160oMkcd8SYKnYV1Nb1aEOjCe6L5ZOiLfF120EjWhuBu3YIZt1NQmujnk5F4MgOpURzLfAwOBSTmzp3fpDxuI/pabxpqOoz2r2HLAb0GMbZKlNV5/Hg9XJypguryA7lPF5KMdTZQzHjqxNPhWhzIuAruOl1eNqKEx1tSh5rfbxdw7mOxCq4qS68ZTjKS1YVvilu559vWvFHhh4rZrdyZ69Vmpgdj8fJbDZLJpNJ0uv1cnr/gjrUhQMuI+ANjyuwftQ0bbL6Erp0mM/ny8Fg4M3LtdRxgMtKl3jwmIHVxYXChFy94/Rmpa/pTbNUhstKV+4Rr8lLQ9KlUvJKLyG8yvQ2s9SBy1Jb7jV5a0yapfF6apaZLjLLcWtd4sNrmJUMHyM+1xibTjH82Zh01TNlhsrOhdKTe00uAzZQmN6+KW+sDa/JD2PSVQ873m29yf+1Q9VDzfEYlHi1G5LKBBWZbtEsHbFwb1oYDwr1ZiF/2bnCSg1OBE/pfr9/bWx26UxJL3ONPISOLKUvQza0LZUxSKyjpdTGa/vDEr25rddbMM0Q3O6Lx3rqFvU+x6UrRKQY7tyrZecmD9FODy8uLizTmilwNj0kraNcAJhOp5aGVwsAGD5VmJBrWWbJSgWT9zrzWepQF47RaGSiKfeGx6Szi3gzmX/HHbihwBser4B9UJYpFBNX4R6vTn3VQnez0SymnrHQMsRYGTr1dSk34ljRqS/EMd2pLQ8YBp3a1PLfcqCpo8gtHkZFHKkTX6fs3MY0blKnth66rKCnU0VRGu37ONrQaA4eZDFtWAu2fXj9zjFkxTBOo8F7t926gTp/83Kyzzcy2kZD6xiqxTYnHLRFm3vHiRSwNSjkz3hoIzo8lCKWUlg/YtGs7tObunDAZfpDLbfEI15zsEIY3U/x/gHHc/G1zltnAgAAAABJRU5ErkJggg==');
+
+}
+
+.modal-spinner {
+ display: none;
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ transform: translateY(-50%) translateX(-50%);
+ padding: 12px 16px;
+ border-radius: 5px;
+ background-color: #111;
+ height: 20px;
+}
+
+.modal-spinner > div {
+ border-radius: 100px;
+ background-color: #fff;
+ height: 20px;
+ width: 2px;
+ margin: 0 1px;
+ display: inline-block;
+
+ -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
+ animation: sk-stretchdelay 1.2s infinite ease-in-out;
+}
+
+.modal-spinner .rect2 {
+ -webkit-animation-delay: -1.1s;
+ animation-delay: -1.1s;
+}
+
+.modal-spinner .rect3 {
+ -webkit-animation-delay: -1.0s;
+ animation-delay: -1.0s;
+}
+
+.modal-spinner .rect4 {
+ -webkit-animation-delay: -0.9s;
+ animation-delay: -0.9s;
+}
+
+@-webkit-keyframes sk-stretchdelay {
+ 0%, 40%, 100% { -webkit-transform: scaleY(0.5) }
+ 20% { -webkit-transform: scaleY(1.0) }
+}
+
+@keyframes sk-stretchdelay {
+ 0%, 40%, 100% {
+ transform: scaleY(0.5);
+ -webkit-transform: scaleY(0.5);
+ } 20% {
+ transform: scaleY(1.0);
+ -webkit-transform: scaleY(1.0);
+ }
+}
diff --git a/jquery.modal.js b/jquery.modal.js
new file mode 100644
index 0000000..02c522d
--- /dev/null
+++ b/jquery.modal.js
@@ -0,0 +1,244 @@
+/*
+ A simple jQuery modal (http://github.com/kylefox/jquery-modal)
+ Version 0.9.1
+*/
+
+(function (factory) {
+ // Making your jQuery plugin work better with npm tools
+ // http://blog.npmjs.org/post/112712169830/making-your-jquery-plugin-work-better-with-npm
+ if(typeof module === "object" && typeof module.exports === "object") {
+ factory(require("jquery"), window, document);
+ }
+ else {
+ factory(jQuery, window, document);
+ }
+}(function($, window, document, undefined) {
+
+ var modals = [],
+ getCurrent = function() {
+ return modals.length ? modals[modals.length - 1] : null;
+ },
+ selectCurrent = function() {
+ var i,
+ selected = false;
+ for (i=modals.length-1; i>=0; i--) {
+ if (modals[i].$blocker) {
+ modals[i].$blocker.toggleClass('current',!selected).toggleClass('behind',selected);
+ selected = true;
+ }
+ }
+ };
+
+ $.modal = function(el, options) {
+ var remove, target;
+ this.$body = $('body');
+ this.options = $.extend({}, $.modal.defaults, options);
+ this.options.doFade = !isNaN(parseInt(this.options.fadeDuration, 10));
+ this.$blocker = null;
+ if (this.options.closeExisting)
+ while ($.modal.isActive())
+ $.modal.close(); // Close any open modals.
+ modals.push(this);
+ if (el.is('a')) {
+ target = el.attr('href');
+ this.anchor = el;
+ //Select element by id from href
+ if (/^#/.test(target)) {
+ this.$elm = $(target);
+ if (this.$elm.length !== 1) return null;
+ this.$body.append(this.$elm);
+ this.open();
+ //AJAX
+ } else {
+ this.$elm = $('<div>');
+ this.$body.append(this.$elm);
+ remove = function(event, modal) { modal.elm.remove(); };
+ this.showSpinner();
+ el.trigger($.modal.AJAX_SEND);
+ $.get(target).done(function(html) {
+ if (!$.modal.isActive()) return;
+ el.trigger($.modal.AJAX_SUCCESS);
+ var current = getCurrent();
+ current.$elm.empty().append(html).on($.modal.CLOSE, remove);
+ current.hideSpinner();
+ current.open();
+ el.trigger($.modal.AJAX_COMPLETE);
+ }).fail(function() {
+ el.trigger($.modal.AJAX_FAIL);
+ var current = getCurrent();
+ current.hideSpinner();
+ modals.pop(); // remove expected modal from the list
+ el.trigger($.modal.AJAX_COMPLETE);
+ });
+ }
+ } else {
+ this.$elm = el;
+ this.anchor = el;
+ this.$body.append(this.$elm);
+ this.open();
+ }
+ };
+
+ $.modal.prototype = {
+ constructor: $.modal,
+
+ open: function() {
+ var m = this;
+ this.block();
+ this.anchor.blur();
+ if(this.options.doFade) {
+ setTimeout(function() {
+ m.show();
+ }, this.options.fadeDuration * this.options.fadeDelay);
+ } else {
+ this.show();
+ }
+ $(document).off('keydown.modal').on('keydown.modal', function(event) {
+ var current = getCurrent();
+ if (event.which === 27 && current.options.escapeClose) current.close();
+ });
+ if (this.options.clickClose)
+ this.$blocker.click(function(e) {
+ if (e.target === this)
+ $.modal.close();
+ });
+ },
+
+ close: function() {
+ modals.pop();
+ this.unblock();
+ this.hide();
+ if (!$.modal.isActive())
+ $(document).off('keydown.modal');
+ },
+
+ block: function() {
+ this.$elm.trigger($.modal.BEFORE_BLOCK, [this._ctx()]);
+ this.$body.css('overflow','hidden');
+ this.$blocker = $('<div class="' + this.options.blockerClass + ' blocker current"></div>').appendTo(this.$body);
+ selectCurrent();
+ if(this.options.doFade) {
+ this.$blocker.css('opacity',0).animate({opacity: 1}, this.options.fadeDuration);
+ }
+ this.$elm.trigger($.modal.BLOCK, [this._ctx()]);
+ },
+
+ unblock: function(now) {
+ if (!now && this.options.doFade)
+ this.$blocker.fadeOut(this.options.fadeDuration, this.unblock.bind(this,true));
+ else {
+ this.$blocker.children().appendTo(this.$body);
+ this.$blocker.remove();
+ this.$blocker = null;
+ selectCurrent();
+ if (!$.modal.isActive())
+ this.$body.css('overflow','');
+ }
+ },
+
+ show: function() {
+ this.$elm.trigger($.modal.BEFORE_OPEN, [this._ctx()]);
+ if (this.options.showClose) {
+ this.closeButton = $('<a href="#close-modal" rel="modal:close" class="close-modal ' + this.options.closeClass + '">' + this.options.closeText + '</a>');
+ this.$elm.append(this.closeButton);
+ }
+ this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker);
+ if(this.options.doFade) {
+ this.$elm.css({opacity: 0, display: 'inline-block'}).animate({opacity: 1}, this.options.fadeDuration);
+ } else {
+ this.$elm.css('display', 'inline-block');
+ }
+ this.$elm.trigger($.modal.OPEN, [this._ctx()]);
+ },
+
+ hide: function() {
+ this.$elm.trigger($.modal.BEFORE_CLOSE, [this._ctx()]);
+ if (this.closeButton) this.closeButton.remove();
+ var _this = this;
+ if(this.options.doFade) {
+ this.$elm.fadeOut(this.options.fadeDuration, function () {
+ _this.$elm.trigger($.modal.AFTER_CLOSE, [_this._ctx()]);
+ });
+ } else {
+ this.$elm.hide(0, function () {
+ _this.$elm.trigger($.modal.AFTER_CLOSE, [_this._ctx()]);
+ });
+ }
+ this.$elm.trigger($.modal.CLOSE, [this._ctx()]);
+ },
+
+ showSpinner: function() {
+ if (!this.options.showSpinner) return;
+ this.spinner = this.spinner || $('<div class="' + this.options.modalClass + '-spinner"></div>')
+ .append(this.options.spinnerHtml);
+ this.$body.append(this.spinner);
+ this.spinner.show();
+ },
+
+ hideSpinner: function() {
+ if (this.spinner) this.spinner.remove();
+ },
+
+ //Return context for custom events
+ _ctx: function() {
+ return { elm: this.$elm, $elm: this.$elm, $blocker: this.$blocker, options: this.options };
+ }
+ };
+
+ $.modal.close = function(event) {
+ if (!$.modal.isActive()) return;
+ if (event) event.preventDefault();
+ var current = getCurrent();
+ current.close();
+ return current.$elm;
+ };
+
+ // Returns if there currently is an active modal
+ $.modal.isActive = function () {
+ return modals.length > 0;
+ };
+
+ $.modal.getCurrent = getCurrent;
+
+ $.modal.defaults = {
+ closeExisting: true,
+ escapeClose: true,
+ clickClose: true,
+ closeText: 'Close',
+ closeClass: '',
+ modalClass: "modal",
+ blockerClass: "jquery-modal",
+ spinnerHtml: '<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>',
+ showSpinner: true,
+ showClose: true,
+ fadeDuration: null, // Number of milliseconds the fade animation takes.
+ fadeDelay: 1.0 // Point during the overlay's fade-in that the modal begins to fade in (.5 = 50%, 1.5 = 150%, etc.)
+ };
+
+ // Event constants
+ $.modal.BEFORE_BLOCK = 'modal:before-block';
+ $.modal.BLOCK = 'modal:block';
+ $.modal.BEFORE_OPEN = 'modal:before-open';
+ $.modal.OPEN = 'modal:open';
+ $.modal.BEFORE_CLOSE = 'modal:before-close';
+ $.modal.CLOSE = 'modal:close';
+ $.modal.AFTER_CLOSE = 'modal:after-close';
+ $.modal.AJAX_SEND = 'modal:ajax:send';
+ $.modal.AJAX_SUCCESS = 'modal:ajax:success';
+ $.modal.AJAX_FAIL = 'modal:ajax:fail';
+ $.modal.AJAX_COMPLETE = 'modal:ajax:complete';
+
+ $.fn.modal = function(options){
+ if (this.length === 1) {
+ new $.modal(this, options);
+ }
+ return this;
+ };
+
+ // Automatically bind links with rel="modal:close" to, well, close the modal.
+ $(document).on('click.modal', 'a[rel~="modal:close"]', $.modal.close);
+ $(document).on('click.modal', 'a[rel~="modal:open"]', function(event) {
+ event.preventDefault();
+ $(this).modal();
+ });
+}));
diff --git a/jquery.modal.min.css b/jquery.modal.min.css
new file mode 100644
index 0000000..f568c62
--- /dev/null
+++ b/jquery.modal.min.css
@@ -0,0 +1 @@
+.blocker{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;overflow:auto;z-index:1;padding:20px;box-sizing:border-box;background-color:#000;background-color:rgba(0,0,0,0.75);text-align:center}.blocker:before{content:"";display:inline-block;height:100%;vertical-align:middle;margin-right:-0.05em}.blocker.behind{background-color:transparent}.modal{display:none;vertical-align:middle;position:relative;z-index:2;max-width:500px;box-sizing:border-box;width:90%;background:#fff;padding:15px 30px;-webkit-border-radius:8px;-moz-border-radius:8px;-o-border-radius:8px;-ms-border-radius:8px;border-radius:8px;-webkit-box-shadow:0 0 10px #000;-moz-box-shadow:0 0 10px #000;-o-box-shadow:0 0 10px #000;-ms-box-shadow:0 0 10px #000;box-shadow:0 0 10px #000;text-align:left}.modal a.close-modal{position:absolute;top:-12.5px;right:-12.5px;display:block;width:30px;height:30px;text-indent:-9999px;background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAA3hJREFUaAXlm8+K00Acx7MiCIJH/yw+gA9g25O49SL4AO3Bp1jw5NvktC+wF88qevK4BU97EmzxUBCEolK/n5gp3W6TTJPfpNPNF37MNsl85/vN/DaTmU6PknC4K+pniqeKJ3k8UnkvDxXJzzy+q/yaxxeVHxW/FNHjgRSeKt4rFoplzaAuHHDBGR2eS9G54reirsmienDCTRt7xwsp+KAoEmt9nLaGitZxrBbPFNaGfPloGw2t4JVamSt8xYW6Dg1oCYo3Yv+rCGViV160oMkcd8SYKnYV1Nb1aEOjCe6L5ZOiLfF120EjWhuBu3YIZt1NQmujnk5F4MgOpURzLfAwOBSTmzp3fpDxuI/pabxpqOoz2r2HLAb0GMbZKlNV5/Hg9XJypguryA7lPF5KMdTZQzHjqxNPhWhzIuAruOl1eNqKEx1tSh5rfbxdw7mOxCq4qS68ZTjKS1YVvilu559vWvFHhh4rZrdyZ69Vmpgdj8fJbDZLJpNJ0uv1cnr/gjrUhQMuI+ANjyuwftQ0bbL6Erp0mM/ny8Fg4M3LtdRxgMtKl3jwmIHVxYXChFy94/Rmpa/pTbNUhstKV+4Rr8lLQ9KlUvJKLyG8yvQ2s9SBy1Jb7jV5a0yapfF6apaZLjLLcWtd4sNrmJUMHyM+1xibTjH82Zh01TNlhsrOhdKTe00uAzZQmN6+KW+sDa/JD2PSVQ873m29yf+1Q9VDzfEYlHi1G5LKBBWZbtEsHbFwb1oYDwr1ZiF/2bnCSg1OBE/pfr9/bWx26UxJL3ONPISOLKUvQza0LZUxSKyjpdTGa/vDEr25rddbMM0Q3O6Lx3rqFvU+x6UrRKQY7tyrZecmD9FODy8uLizTmilwNj0kraNcAJhOp5aGVwsAGD5VmJBrWWbJSgWT9zrzWepQF47RaGSiKfeGx6Szi3gzmX/HHbihwBser4B9UJYpFBNX4R6vTn3VQnez0SymnrHQMsRYGTr1dSk34ljRqS/EMd2pLQ8YBp3a1PLfcqCpo8gtHkZFHKkTX6fs3MY0blKnth66rKCnU0VRGu37ONrQaA4eZDFtWAu2fXj9zjFkxTBOo8F7t926gTp/83Kyzzcy2kZD6xiqxTYnHLRFm3vHiRSwNSjkz3hoIzo8lCKWUlg/YtGs7tObunDAZfpDLbfEI15zsEIY3U/x/gHHc/G1zltnAgAAAABJRU5ErkJggg==')}.modal-spinner{display:none;position:fixed;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);padding:12px 16px;border-radius:5px;background-color:#111;height:20px}.modal-spinner>div{border-radius:100px;background-color:#fff;height:20px;width:2px;margin:0 1px;display:inline-block;-webkit-animation:sk-stretchdelay 1.2s infinite ease-in-out;animation:sk-stretchdelay 1.2s infinite ease-in-out}.modal-spinner .rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.modal-spinner .rect3{-webkit-animation-delay:-1.0s;animation-delay:-1.0s}.modal-spinner .rect4{-webkit-animation-delay:-0.9s;animation-delay:-0.9s}@-webkit-keyframes sk-stretchdelay{0%,40%,100%{-webkit-transform:scaleY(0.5)}20%{-webkit-transform:scaleY(1.0)}}@keyframes sk-stretchdelay{0%,40%,100%{transform:scaleY(0.5);-webkit-transform:scaleY(0.5)}20%{transform:scaleY(1.0);-webkit-transform:scaleY(1.0)}}
\ No newline at end of file
diff --git a/jquery.modal.min.js b/jquery.modal.min.js
new file mode 100644
index 0000000..690d509
--- /dev/null
+++ b/jquery.modal.min.js
@@ -0,0 +1,5 @@
+/*
+ A simple jQuery modal (http://github.com/kylefox/jquery-modal)
+ Version 0.9.1
+*/
+!function(o){"object"==typeof module&&"object"==typeof module.exports?o(require("jquery"),window,document):o(jQuery,window,document)}(function(o,t,i,e){var s=[],l=function(){return s.length?s[s.length-1]:null},n=function(){var o,t=!1;for(o=s.length-1;o>=0;o--)s[o].$blocker&&(s[o].$blocker.toggleClass("current",!t).toggleClass("behind",t),t=!0)};o.modal=function(t,i){var e,n;if(this.$body=o("body"),this.options=o.extend({},o.modal.defaults,i),this.options.doFade=!isNaN(parseInt(this.options.fadeDuration,10)),this.$blocker=null,this.options.closeExisting)for(;o.modal.isActive();)o.modal.close();if(s.push(this),t.is("a"))if(n=t.attr("href"),this.anchor=t,/^#/.test(n)){if(this.$elm=o(n),1!==this.$elm.length)return null;this.$body.append(this.$elm),this.open()}else this.$elm=o("<div>"),this.$body.append(this.$elm),e=function(o,t){t.elm.remove()},this.showSpinner(),t.trigger(o.modal.AJAX_SEND),o.get(n).done(function(i){if(o.modal.isActive()){t.trigger(o.modal.AJAX_SUCCESS);var s=l();s.$elm.empty().append(i).on(o.modal.CLOSE,e),s.hideSpinner(),s.open(),t.trigger(o.modal.AJAX_COMPLETE)}}).fail(function(){t.trigger(o.modal.AJAX_FAIL);var i=l();i.hideSpinner(),s.pop(),t.trigger(o.modal.AJAX_COMPLETE)});else this.$elm=t,this.anchor=t,this.$body.append(this.$elm),this.open()},o.modal.prototype={constructor:o.modal,open:function(){var t=this;this.block(),this.anchor.blur(),this.options.doFade?setTimeout(function(){t.show()},this.options.fadeDuration*this.options.fadeDelay):this.show(),o(i).off("keydown.modal").on("keydown.modal",function(o){var t=l();27===o.which&&t.options.escapeClose&&t.close()}),this.options.clickClose&&this.$blocker.click(function(t){t.target===this&&o.modal.close()})},close:function(){s.pop(),this.unblock(),this.hide(),o.modal.isActive()||o(i).off("keydown.modal")},block:function(){this.$elm.trigger(o.modal.BEFORE_BLOCK,[this._ctx()]),this.$body.css("overflow","hidden"),this.$blocker=o('<div class="'+this.options.blockerClass+' blocker current"></div>').appendTo(this.$body),n(),this.options.doFade&&this.$blocker.css("opacity",0).animate({opacity:1},this.options.fadeDuration),this.$elm.trigger(o.modal.BLOCK,[this._ctx()])},unblock:function(t){!t&&this.options.doFade?this.$blocker.fadeOut(this.options.fadeDuration,this.unblock.bind(this,!0)):(this.$blocker.children().appendTo(this.$body),this.$blocker.remove(),this.$blocker=null,n(),o.modal.isActive()||this.$body.css("overflow",""))},show:function(){this.$elm.trigger(o.modal.BEFORE_OPEN,[this._ctx()]),this.options.showClose&&(this.closeButton=o('<a href="#close-modal" rel="modal:close" class="close-modal '+this.options.closeClass+'">'+this.options.closeText+"</a>"),this.$elm.append(this.closeButton)),this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker),this.options.doFade?this.$elm.css({opacity:0,display:"inline-block"}).animate({opacity:1},this.options.fadeDuration):this.$elm.css("display","inline-block"),this.$elm.trigger(o.modal.OPEN,[this._ctx()])},hide:function(){this.$elm.trigger(o.modal.BEFORE_CLOSE,[this._ctx()]),this.closeButton&&this.closeButton.remove();var t=this;this.options.doFade?this.$elm.fadeOut(this.options.fadeDuration,function(){t.$elm.trigger(o.modal.AFTER_CLOSE,[t._ctx()])}):this.$elm.hide(0,function(){t.$elm.trigger(o.modal.AFTER_CLOSE,[t._ctx()])}),this.$elm.trigger(o.modal.CLOSE,[this._ctx()])},showSpinner:function(){this.options.showSpinner&&(this.spinner=this.spinner||o('<div class="'+this.options.modalClass+'-spinner"></div>').append(this.options.spinnerHtml),this.$body.append(this.spinner),this.spinner.show())},hideSpinner:function(){this.spinner&&this.spinner.remove()},_ctx:function(){return{elm:this.$elm,$elm:this.$elm,$blocker:this.$blocker,options:this.options}}},o.modal.close=function(t){if(o.modal.isActive()){t&&t.preventDefault();var i=l();return i.close(),i.$elm}},o.modal.isActive=function(){return s.length>0},o.modal.getCurrent=l,o.modal.defaults={closeExisting:!0,escapeClose:!0,clickClose:!0,closeText:"Close",closeClass:"",modalClass:"modal",blockerClass:"jquery-modal",spinnerHtml:'<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>',showSpinner:!0,showClose:!0,fadeDuration:null,fadeDelay:1},o.modal.BEFORE_BLOCK="modal:before-block",o.modal.BLOCK="modal:block",o.modal.BEFORE_OPEN="modal:before-open",o.modal.OPEN="modal:open",o.modal.BEFORE_CLOSE="modal:before-close",o.modal.CLOSE="modal:close",o.modal.AFTER_CLOSE="modal:after-close",o.modal.AJAX_SEND="modal:ajax:send",o.modal.AJAX_SUCCESS="modal:ajax:success",o.modal.AJAX_FAIL="modal:ajax:fail",o.modal.AJAX_COMPLETE="modal:ajax:complete",o.fn.modal=function(t){return 1===this.length&&new o.modal(this,t),this},o(i).on("click.modal",'a[rel~="modal:close"]',o.modal.close),o(i).on("click.modal",'a[rel~="modal:open"]',function(t){t.preventDefault(),o(this).modal()})});
\ No newline at end of file
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..aa28f06
--- /dev/null
+++ b/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "jquery-modal",
+ "version": "0.9.1",
+ "main": "jquery.modal.js",
+ "style": "jquery.modal.css",
+ "description": "The simplest possible modal for jQuery",
+ "homepage": "https://github.com/kylefox/jquery-modal",
+ "repository": "kylefox/jquery-modal",
+ "bugs": "https://github.com/kylefox/jquery-modal/issues",
+ "license": "MIT",
+ "author": "Kyle Fox <kylefox@gmail.com> (http://kylefox.ca/)",
+ "devDependencies": {
+ "gulp": "^3.9.0",
+ "gulp-conventional-changelog": "^0.7.0",
+ "gulp-rename": "^1.2.2",
+ "gulp-uglify": "^1.4.1",
+ "gulp-uglifycss": "^1.0.6"
+ }
+}