Good day everyone!

The code will not earn anything ... It is necessary when entering the number from x to y to display the image, but it does.

Here is the code

if(( $('#scale').css('height')>='10%') && ( $('#scale').css('height')<'25%')){ $("#dn_meter").css('backgroundImage', 'url(../images/donate10.jpg)'); } 

    1 answer 1

     var s = $('#scale'), h = s.height()/s.parent().height()*100; if(h >= 10 && h <= 25) { ... } 

    But I’m not going to know where to screw x and y here.

    • does not work: '( - Ra Sh
    • Can you show your code in full version on the site? (I will look this morning). And, by the way, output intermediate values ​​somewhere - it can be a great help. - ling