Changeset 16554 for trunk/wp-admin/js/theme.dev.js
- Timestamp:
- 11/23/2010 08:20:44 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/js/theme.dev.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/theme.dev.js
r16553 r16554 3 3 (function($){ 4 4 ThemeViewer = function( args ) { 5 6 function filter_count() {7 var count = $( '#filter-box :checked' ).length;8 var text = $( '#filter-click' ).text();9 10 if ( text.indexOf( '(' ) != -1 )11 text = text.substr( 0, text.indexOf( '(' ) );12 13 if ( count == 0 )14 $( '#filter-click' ).text( text );15 else16 $( '#filter-click' ).text( text + ' (' + count + ')' );17 }18 5 19 6 function init() { … … 26 13 27 14 $( '#filter-box :checkbox' ).unbind( 'click' ).click( function() { 28 filter_count(); 15 var count = $( '#filter-box :checked' ).length, 16 text = $( '#filter-click' ).text(); 17 18 if ( text.indexOf( '(' ) != -1 ) 19 text = text.substr( 0, text.indexOf( '(' ) ); 20 21 if ( count == 0 ) 22 $( '#filter-click' ).text( text ); 23 else 24 $( '#filter-click' ).text( text + ' (' + count + ')' ); 29 25 }); 30 26
Note: See TracChangeset
for help on using the changeset viewer.