Skip to content

Commit

Permalink
Update reveal to explain how to use the event bindings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Humphreys committed Nov 26, 2013
1 parent 396ee29 commit 9949030
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
4 changes: 0 additions & 4 deletions doc/includes/reveal/examples_reveal_javascript_options.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
close_on_background_click: true,
dismiss_modal_class: 'close-reveal-modal',
bg_class: 'reveal-modal-bg',
open: function(){},
opened: function(){},
close: function(){},
closed: function(){},
bg : $('.reveal-modal-bg'),
css : {
open : {
Expand Down
26 changes: 25 additions & 1 deletion doc/pages/components/reveal.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,31 @@ <h4>JS</h4>

<p>Please refer to <a href="http://api.jquery.com/jQuery.ajax/">http://api.jquery.com/jQuery.ajax/</a> for a complete list of possible parameters.</p>

<hr />
***

### Event Bindings

There are a series of events that you can bind to to trigger your callbacks:

```js
$(document).on('open', '[data-reveal]', function () {
var modal = $(this);
});

$(document).on('opened', '[data-reveal]', function () {
var modal = $(this);
});

$(document).on('close', '[data-reveal]', function () {
var modal = $(this);
});

$(document).on('closed', '[data-reveal]', function () {
var modal = $(this);
});
```

***

<h2>Customize With Sass</h2>

Expand Down

0 comments on commit 9949030

Please sign in to comment.