Reuse partial to render a banner
This commit is contained in:
@@ -4,23 +4,23 @@
|
||||
initialize: function() {
|
||||
$("[data-js-banner-title]").on({
|
||||
change: function() {
|
||||
$("#js-banner-title").text($(this).val());
|
||||
$(".banner h2").text($(this).val());
|
||||
}
|
||||
});
|
||||
$("[data-js-banner-description]").on({
|
||||
change: function() {
|
||||
$("#js-banner-description").text($(this).val());
|
||||
$(".banner h3").text($(this).val());
|
||||
}
|
||||
});
|
||||
$("[name='banner[background_color]']").on({
|
||||
change: function() {
|
||||
$("#js-banner-background").css("background-color", $(this).val());
|
||||
$(".banner").css("background-color", $(this).val());
|
||||
}
|
||||
});
|
||||
$("[name='banner[font_color]']").on({
|
||||
change: function() {
|
||||
$("#js-banner-title").css("color", $(this).val());
|
||||
$("#js-banner-description").css("color", $(this).val());
|
||||
$(".banner h2").css("color", $(this).val());
|
||||
$(".banner h3").css("color", $(this).val());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user