css - How To change box shadow range in jQuery -



css - How To change box shadow range in jQuery -

how alter box shadow width code

$('#range1').change(function () { $('.divwidth').css({ boxshadowx: this.value + 'px' }); $('.divwidth').css({ 'boxshadowy': this.value + 'px' }); $('.divwidth').css({ 'boxshadowblur': this.value + 'px' }); });

this.value + 'px' = avalue of html range

jquery before 1.8

$('.divwidth').css({ 'color' : 'black', 'background' : 'white', 'border-radius' : '15px', 'box-shadow' : '0px 0px 0px #444', '-moz-box-shadow' : '0px 0px 0px #444', '-webkit-box-shadow' : '0px 0px 0px #444', });

after 1.8 can utilize

$('.divwidth').css({ boxshadow: '1px 3px 6px #444' })

and is:

$('.divwidth').css({ boxshadow: '1px ' + this.value + 'px ' + '6px #444' })

and boxshadow property boxshadow : horizontal(x) vertical(y) blur shadow

jquery css function range onchange

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -