[Proto-Scripty] Re: How to insert element with value taken from attribute of parent ?

2010-08-29 Thread elivol
Hello Unfortunately it doesn't work: $$('div.item_content').invoke('insert', {bottom: '' }); The script fails if I put this.getAttribute('sale_num') On Aug 27, 6:55 pm, Walter Lee Davis wrote: > You could get the value inside your iterator by looking at: > > this.getAttribute('sale_num') > >

[Proto-Scripty] Re: scriptaculous causes body background to fail on safari and chrome

2010-08-29 Thread morgancurrie
This bug has been driving me crazy for a while now, and it was only some random trial and error that exposed it as Prototype and brought me here. Anyone have any suggestions? -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post

[Proto-Scripty] Re: scriptaculous causes body background to fail on safari and chrome

2010-08-29 Thread morgancurrie
I found a fix for this. For starters, it's not scriptaculous, it's prototype. Remove the scriptaculous library from your example and you'll still have the problem. Here's the fix: instead of setting your background image/colour in the body selector, set it in the html selector, like this: html {

[Proto-Scripty] Re: How to insert element with value taken from attribute of parent ?

2010-08-29 Thread T.J. Crowder
Hi, You don't want #invoke, you want #each: $$('div.item_content').each(function(div) { div.insert({ bottom: '' }); }); http://api.prototypejs.org/language/enumerable/prototype/each/ Also note I've used #readAttribute (Prototype) rather than getAttribute (DOM), as it handles som