Permalink
Browse files

Adding an example of callback to README.md

  • Loading branch information...
1 parent ef6ce30 commit 7a3f5715d904fd6cc336839d32f097bd84455988 Corey Olsen committed with Aug 19, 2010
Showing with 9 additions and 0 deletions.
  1. +9 −0 README.md
View
@@ -22,6 +22,15 @@ How To Use
<script type="text/javascript" src="ui.tabs.closable.min.js"></script>
2. add a `closable` option when instatiating the tabs:
$('#tabs').tabs({closable: true})
+3. (optional) If you wish to receive a callback when the close button is
+ clicked you can add a `closableClick` function to the tab options:
+ $('#tabs').tabs({
+ closable: true,
+ closableClick: function(event, ui) {
+ // return true to allow the remove of the tab
+ // return false to prevent the remove
+ }
+ });
That's it, about as unobtrusive as I could make it.

0 comments on commit 7a3f571

Please sign in to comment.