[jQuery] Re: help with passing value to jquery

2008-07-16 Thread psdp
000); } } the following doesn't: var obj = { width: 300, div: 'testdiv', func: function () { var newwidth = this.width; $('#'+this.div).animate({width:newwidth+'px'}, 1000); } } On Jul 17, 9:13 am, Karl Swedberg <[EMAIL PROTECTED]>

[jQuery] help with passing value to jquery

2008-07-16 Thread psdp
I have a value stored in an object, and now i want to pass it to a jquery function, please help: var obj = { width: 300, div: 'testdiv', func: function () { var newwidth = this.width; $('#'+this.div).animate({width:newwidth+'px'}, 1000); } }