JavaScript DHTML/Scriptaculous/Float
Содержание
Floating image
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>
<title>script.aculo.us 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>
script.aculo.us functional test file
See if workaround for Safari and floating elements with Effect.Appear works.
<a href="#" onclick="Effect.Appear("float_icon"); return false;">image (floating)</a> |
Lorem ipsum dolor sit amet,
consectetur adipisicing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.
<img id="icon" src="http://www.wbex.ru/style/logo.png" style="display:none" alt="" /> <img id="float_icon" src="http://www.wbex.ru/style/logo.png" style="float:left;opacity:0.4" alt="" />
</body> </html>
</source>
Floating left
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>
<title>script.aculo.us 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>
script.aculo.us functional test file
See if workaround for Safari and floating elements with Effect.Appear works.
<a href="#" onclick="Effect.Appear("float_div_left"); return false;">float:left</a> |
Lorem ipsum dolor sit amet,
consectetur adipisicing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.
<img id="icon" src="http://www.wbex.ru/style/logo.png" style="display:none" alt="" /> <img id="float_icon" src="http://www.wbex.ru/style/logo.png" style="float:left;opacity:0.4" alt="" />
</body> </html>
</source>
Floating right
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>
<title>script.aculo.us 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>
script.aculo.us functional test file
See if workaround for Safari and floating elements with Effect.Appear works.
<a href="#" onclick="Effect.Appear("float_div_right"); return false;">float:right</a> |
Lorem ipsum dolor sit amet,
consectetur adipisicing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.
<img id="icon" src="http://www.wbex.ru/style/logo.png" style="display:none" alt="" /> <img id="float_icon" src="http://www.wbex.ru/style/logo.png" style="float:left;opacity:0.4" alt="" />
</body> </html>
</source>
Floating right and set opacity to 1
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>
<title>script.aculo.us 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>
script.aculo.us functional test file
See if workaround for Safari and floating elements with Effect.Appear works.
<a href="#" onclick="$("float_div_right").setOpacity(1)">float:right (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="http://www.wbex.ru/style/logo.png" style="display:none" alt="" /> <img id="float_icon" src="http://www.wbex.ru/style/logo.png" style="float:left;opacity:0.4" alt="" />
</body> </html>
</source>
Not floating image
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>
<title>script.aculo.us 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>
script.aculo.us functional test file
See if workaround for Safari and floating elements with Effect.Appear works.
<a href="#" onclick="Effect.Appear("icon"); return false;">image (non-floating)</a> |
Lorem ipsum dolor sit amet,
consectetur adipisicing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.
<img id="icon" src="http://www.wbex.ru/style/logo.png" style="display:none" alt="" /> <img id="float_icon" src="http://www.wbex.ru/style/logo.png" style="float:left;opacity:0.4" alt="" />
</body> </html>
</source>