I'm really tired of syntax like this:
.css('position','absolute').css('z-index',z-index)
.css('border','1px solid #00AFFF').css('margin','-1px 0px 0px -1px')
.css('left',pleft)
I wonder if there's any way to pass all parameters in one function, something like:
.foo('position':'absolute','z-index':z-index,
'border':'1px solid #00AFFF','margin':'-1px 0px 0px -1px',
'left':pleft)
Much appreciate any help.
z-index
is not a valid variable name butz
minusindex
assuming both variables exist; otherwise it's an error. – ThiefMaster♦ May 25 '12 at 12:34addClass("myclass");
– Rory McCrossan May 25 '12 at 12:35