2012-08-22 20:04:18 -04:00
|
|
|
(function($) {
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
2012-09-26 21:57:38 -04:00
|
|
|
var bgImage = $("#custom-background-image");
|
|
|
|
|
|
|
|
$('#background-color').wpColorPicker({
|
|
|
|
change: function( event, ui ) {
|
|
|
|
bgImage.css('background-color', ui.color.toString());
|
|
|
|
},
|
|
|
|
clear: function() {
|
|
|
|
bgImage.css('background-color', '');
|
|
|
|
}
|
2012-08-22 20:04:18 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
$('input[name="background-position-x"]').change(function() {
|
2012-09-26 21:57:38 -04:00
|
|
|
bgImage.css('background-position', $(this).val() + ' top');
|
2012-08-22 20:04:18 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
$('input[name="background-repeat"]').change(function() {
|
2012-09-26 21:57:38 -04:00
|
|
|
bgImage.css('background-repeat', $(this).val());
|
2012-08-22 20:04:18 -04:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
})(jQuery);
|