Skip to content

Commit

Permalink
Updated for changes in version 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobRFox committed Oct 2, 2015
1 parent 81745b0 commit 0bdafab
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Change Log

Recent changes
--------------
* Added JS events for pre-processing of modal content (1.4)
* Improved image and iframe content loading (1.4)
* Added support for JS events in modal content (1.3.10)
* Fixed IE8 bug that caused the resize event to continuously fire during the show animation (1.3.10)
* Fixed IE bug that prevented modal content from showing under certain conditions (1.3.10)
Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,37 @@ Example Usage
</html>
```

Events Usage
----------------
```html
<html>
...
<!-- Put data-preprocess='true' on link of modal you wish to pre-process -->
<div class='chaos-modal-link' data-preprocess='true'>Link</div>
...
</html>
```

```javascript
var modal_links = $('.chaos-modal-link');

//Runs on modal link selector before modal is displayed
//Modal variable contains the modal associated with the modal link.
modal_links.on('chaos-modal-preprocess', function( event, modal){

$(window).on('chaos-modal-preprocess-interrupt', function( event ){
//Event fires when modal/loading screen is closed.
});

//If you do not want to pre-process every time, set data-preprocess to false
//When done pre-processing
$(this).attr('data-preprocess','false');

//Preprocessing function MUST call openModal when preprocessing complete
modal.openModal();
});
```

Features
--------

Expand All @@ -53,6 +84,7 @@ Features
* Inline HTML defined by element id
* Iframe lazy loading for iframes in hidden modal content to improve page load.
* Internet Explorer support back to version 8.
* Event support for pre-processing the modal content.

Wishlist
--------
Expand Down
25 changes: 15 additions & 10 deletions jquery.modal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0bdafab

Please sign in to comment.