opacity from javascript

5 views
Skip to first unread message

killer...@gmail.com

unread,
Sep 28, 2007, 12:20:38 AM9/28/07
to iPhoneWebDev
I can't seem to change the opacity of an object from within
javascript. I want a div to fade over time. It works in safari
3.0.2, but not on the iphone. Any suggestions. I have tried:

//chooser.style.opacity = (20-i)/30;
chooser.style['opacity'] = (20-i)/30;
//changecss('iframe.chooser', 'opacity', (20-i)/30);

(Changecss searches the style sheets and changes it there).

All above (including commented out version) work.
chooser points to an iframe (but also doesn't work if pointing to a
div)

killer...@gmail.com

unread,
Sep 29, 2007, 12:55:30 PM9/29/07
to iPhoneWebDev
I figured out the problem. The safari/iphone won't do an opacity on
an iframe. The problem with the other elements, was I was modifying
the style sheet in the parent and it wasn't affecting the iframe. So,
one bug from them and one from me.

On Sep 28, 12:20 am, "killersud...@gmail.com" <killersud...@gmail.com>
wrote:

Reply all
Reply to author
Forward
0 new messages