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

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -