mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Custom background UI updates. props ocean90 for initial patch, see #12186.
git-svn-id: https://develop.svn.wordpress.org/trunk@14684 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -12,8 +12,7 @@ jQuery(document).ready(function() {
|
||||
});
|
||||
|
||||
jQuery('#background-color').keyup(function() {
|
||||
var _hex = jQuery('#background-color').val();
|
||||
var hex = _hex;
|
||||
var _hex = jQuery('#background-color').val(), hex = _hex;
|
||||
if ( hex[0] != '#' )
|
||||
hex = '#' + hex;
|
||||
hex = hex.replace(/[^#a-fA-F0-9]+/, '');
|
||||
@@ -23,17 +22,13 @@ jQuery(document).ready(function() {
|
||||
pickColor( hex );
|
||||
});
|
||||
|
||||
jQuery('input[name="background-position"]').change(function() {
|
||||
jQuery('#custom-background-image').css('background-position', 'top ' + jQuery(this).val());
|
||||
jQuery('input[name="background-position-x"]').change(function() {
|
||||
jQuery('#custom-background-image').css('background-position', jQuery(this).val() + ' top');
|
||||
});
|
||||
|
||||
jQuery('select[name="background-repeat"]').change(function() {
|
||||
jQuery('#custom-background-image').css('background-repeat', jQuery(this).val());
|
||||
});
|
||||
|
||||
jQuery('input[name="background-attachment"]').change(function() {
|
||||
jQuery('#custom-background-image').css('background-attachment', jQuery(this).val());
|
||||
});
|
||||
|
||||
farbtastic = jQuery.farbtastic('#colorPickerDiv', function(color) {
|
||||
pickColor(color);
|
||||
|
||||
Reference in New Issue
Block a user