iframe opacity with input type=range (slider) not recognizing 1.0 -


i'm building internal tool here @ work back-end developers match front-end comps. i'm doing giving developers little toolbar in browser overlay iframe , load comp depending on checkbox click. can toggle on , off adjust opacity of iframe.

i'm running problem where, slider, doesn't seem recognize '1.0' opacity. when first load up, iframe @ 100% opacity. if use slider go down in value, iframe reduces opacity. when use slider go in value, opacity increases until end, max value of 10. works 9, there no change 9 10.

here's form element/slider:

<input id="range" size="1" type="range" min="0" max="10" step="1" value="10"> <label id="range_label" for="range">comp opacity:</label> 

and event handler:

$('#range').change(function() {     var val = this.value;     console.log(val);      if (val == 10) {         iframe.style.opactiy = '1.0';     } else {         iframe.style.opacity = '0.' + this.value;     } }); 

anyone have ideas?

edit: i've updated range go 0-100 (incrementing 1 each step) instead of 0-10 , helps little instead of ending @ 90% opacity, seem end @ 99%. still love know how opacity @ 1.0.

looks typo. try

iframe.style.opacity = '1.0'; 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -