hi need to know is there a way to do some stuff like this (clear code)
var defaultOptions = { hum: $H({top:'-20px',left:'0px'}) }; var Sv = Class.create(); Sv.prototype = { initialize:function(element, options){ this.element = $(element); this.options = Object.clone(defaultOptions); Object.extend(this.options, options || {}); buildSV: function() { this.el.setStyle({ position:'absolute', this.options.hum.keys().first(): this.options.hum.values().first (), this.options.hum.keys().last(): this.options.hum.values().last() }); } }; this.options.hum.keys().first() and last() are not interprete and causes errors. dont really know how to do this ?* steph --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---