Changeset 13764 for trunk/wp-admin/custom-background.php
- Timestamp:
- 03/19/2010 09:10:37 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-background.php
r13751 r13764 180 180 jQuery('#background-color').val(color); 181 181 farbtastic.setColor(color); 182 jQuery('#custom-background-image').css('background-color', color); 182 183 } 183 184 … … 185 186 jQuery('#pickcolor').click(function() { 186 187 jQuery('#colorPickerDiv').show(); 188 }); 189 jQuery('#background-color').keyup(function() { 190 var _hex = jQuery('#background-color').val(); 191 var hex = _hex; 192 if ( hex[0] != '#' ) 193 hex = '#' + hex; 194 hex = hex.replace(/[^#a-fA-F0-9]+/, ''); 195 if ( hex != _hex ) 196 jQuery('#background-color').val(hex); 197 if ( hex.length == 4 || hex.length == 7 ) 198 pickColor( hex ); 187 199 }); 188 200
Note: See TracChangeset
for help on using the changeset viewer.