javascript - Object index reference -
i've created object
var slider = { this.config = { color : "white", width: 200, maxwidth : //here want insert value of "slider.config.width" * 1.5 } } and want set value of "maxwidth" "width * 1.5".
how can it?
i had difficulties make work object on jsfiddle, made similar :
http://jsfiddle.net/06c07qgj/19/
var slider = { color : "white", width: 200, maxwidth : function(e){ this.maxwidth = this.width*1.5;} }; slider.maxwidth(); alert(slider.maxwidth); are sure object doesnt :
var slider = { config : { color : "white", width: 200, maxwidth : //here want insert value of "slider.config.width" * 1.5 } }
Comments
Post a Comment