Permalink
Browse files

Update demo to MooTools 1.4

  • Loading branch information...
akaIDIOT committed Jan 2, 2012
1 parent e5ee790 commit 2b338692f6419e8fdda1d4d55212ef167be4812b
Showing with 785 additions and 838 deletions.
  1. +5 −3 Demo/demo.html
  2. +780 −436 Demo/{mootools-core-1.3.2-full-nocompat.js → mootools-core-1.4.2.js}
  3. +0 −399 Demo/mootools-more-1.3.2.1.js
View
@@ -6,17 +6,19 @@
<head>
<title>Simple MooTools TabPane component</title>
- <script src="mootools-core-1.3.2-full-nocompat.js" type="text/javascript"></script>
- <script src="mootools-more-1.3.2.1.js" type="text/javascript"></script>
+ <script src="mootools-core-1.4.2.js" type="text/javascript"></script>
<script src="../Source/TabPane.js" type="text/javascript"></script>
<script type="text/javascript">
document.addEvent('domready', function() {
var tabPane = new TabPane('demo');
$('demo').addEvent('click:relay(.remove)', function(e) {
- new Event(e).stop();
+ // stop the event from bubbling up and causing a native click
+ e.stop();
var parent = this.getParent('.tab');
+ // find the index for the tab that needs to be closed
var index = $('demo').getElements('.tab').indexOf(parent);
+ // close the tab (closeTab takes care of selecting an adjacent tab)
tabPane.closeTab(index);
});
Oops, something went wrong.

0 comments on commit 2b33869

Please sign in to comment.