Index: trunk/phase3/resources/jquery/jquery.makeCollapsible.js |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | } |
85 | 85 | |
86 | 86 | // Create toggle link with a space around the brackets ( [text] ) |
87 | | - var $toggleLink = $( '<a href="#">' ).text( collapsetext ).wrap( '<span class="mw-collapsible-toggle mw-collapsible-toggle-expanded">' ).parent().prepend( ' [' ).append( '] ' ).click( function(e){ |
| 87 | + var $toggleLink = $( '<a href="#">' ).text( collapsetext ).wrap( '<span class="mw-collapsible-toggle mw-collapsible-toggle-expanded">' ).parent().prepend( ' [' ).append( '] ' ).bind( 'click.mw-collapse', function(e){ |
88 | 88 | e.preventDefault(); |
89 | 89 | toggleFunction( this ); |
90 | 90 | } ); |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | if ( !$toggle.size() ) { |
106 | 106 | $lastCell.prepend( $toggleLink ); |
107 | 107 | } else { |
108 | | - $toggleLink = $toggle.unbind( 'click' ).click( function( e ){ |
| 108 | + $toggleLink = $toggle.unbind( 'click.mw-collapse' ).bind( 'click.mw-collapse', function( e ){ |
109 | 109 | e.preventDefault(); |
110 | 110 | toggleFunction( this ); |
111 | 111 | } ); |
— | — | @@ -122,7 +122,7 @@ |
123 | 123 | } |
124 | 124 | $that.prepend( $toggleLink.wrap( '<li class="mw-collapsibile-toggle-li">' ).parent() ); |
125 | 125 | } else { |
126 | | - $toggleLink = $toggle.unbind( 'click' ).click( function( e ){ |
| 126 | + $toggleLink = $toggle.unbind( 'click.mw-collapse' ).bind( 'click.mw-collapse', function( e ){ |
127 | 127 | e.preventDefault(); |
128 | 128 | toggleFunction( this ); |
129 | 129 | } ); |
— | — | @@ -141,7 +141,7 @@ |
142 | 142 | if ( !$toggle.size() ) { |
143 | 143 | $that.prepend( $toggleLink ); |
144 | 144 | } else { |
145 | | - $toggleLink = $toggle.unbind( 'click' ).click( function( e ){ |
| 145 | + $toggleLink = $toggle.unbind( 'click.mw-collapse' ).bind( 'click.mw-collapse', function( e ){ |
146 | 146 | e.preventDefault(); |
147 | 147 | toggleFunction( this ); |
148 | 148 | } ); |