JavaScript DHTML/Scriptaculous/Opacity

Материал из Web эксперт
Перейти к: навигация, поиск

Set image opacity to 1

   <source lang="html4strict">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


<html xmlns="" xml:lang="en" lang="en"> <head>

 <title> Effects functional test file</title>
 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <script src="scriptaculous-js-1.8.2/lib/prototype.js" type="text/javascript"></script>
 <script src="scriptaculous-js-1.8.2/src/scriptaculous.js" type="text/javascript"></script>
 <script src="scriptaculous-js-1.8.2/src/unittest.js" type="text/javascript"></script>

</head> <body> functional test file

See if workaround for Safari and floating elements with Effect.Appear works.

<a href="#" onclick="$("float_icon").setOpacity(1);">image (setOpacity 1)</a>

 Lorem ipsum dolor sit amet,
consectetur adipisicing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.

<img id="icon" src="" style="display:none" alt="" /> <img id="float_icon" src="" style="float:left;opacity:0.4" alt="" />

</body> </html>