theme-settings: better show/hide image options js
This commit is contained in:
parent
17958da201
commit
ad2611c92e
1 changed files with 7 additions and 4 deletions
|
@ -31,11 +31,14 @@
|
|||
$("#frio_nav_bg, #frio_nav_icon_color, #frio_background_color, #frio_link_color").colorpicker({format: 'hex', align: 'left'});
|
||||
|
||||
// show image options when user user starts to type the address of the image
|
||||
if($("#id_frio_background_image").val() == "") {
|
||||
$("#id_frio_background_image").on('input',function(e){
|
||||
$("#id_frio_background_image").keyup(function(){
|
||||
var elText = $(this).val();
|
||||
if(elText.length !== 0) {
|
||||
$("#frio_bg_image_options").show();
|
||||
});
|
||||
} else {
|
||||
$("#frio_bg_image_options").hide();
|
||||
}
|
||||
});
|
||||
|
||||
// show the image options is there is allready an image
|
||||
if($("#id_frio_background_image").val().length != 0) {
|
||||
|
|
Loading…
Reference in a new issue