Модератор: [mweb team]
Muerto писал(а):В топике viewtopic.php?t=5385 была такая ссылка
http://www.dynamicdrive.com/style/cssli ... ge-viewer/ - тебе по ней.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Untitled Document</title>
<style type="text/css">
/*Credits: Dynamic Drive CSS Library */
/*URL: http://www.dynamicdrive.com/style/ */
.thumbnail{
position: relative;
z-index: 0;
}
.thumbnail:hover{
background-color: transparent;
z-index: 50;
}
.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: lightyellow;
padding: 5px;
left: -1000px;
border: 1px dashed gray;
visibility: hidden;
color: black;
text-decoration: none;
}
.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}
.thumbnail:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
top: 0;
left: 60px; /*position where enlarged image should offset horizontally */
}
</style>
</head>
<body>
<a class="thumbnail" href="#thumb" onMouseOver="document.getElementById('loadnow').src='images/picture.jpg'">картинка подгрузится только при наведении мышкой сюда<span><img src="images/dot.gif" id="loadnow" /></span></a>
</body>
</html>
function showObject(which) {
which.className = 'go';
document.getElementById(wich).src='/'+wich+'_small.jpg';
}
Muerto писал(а):А ты из функции showObject код document.getElementById(wich).src='/'+wich+'_small.jpg'; убрал?
<html>
<head>
</head>
<body>
<style>
.thumbnail div {
position:absolute;
visibility:hidden;
}
.thumbnail:hover div {
visibility:visible;
}
.pop {
visibility: hidden;
}
.go {
visibility: visible;
border:1px dashed black;
}
</style>
<script>
function showObject(which) {
document.getElementById(which).className = 'go';
name=which.substr(2);
setTimeout("document.getElementById('"+name+"').src='http://carsguru.ru/web/exterior/audi_"+which+"_small.jpg'", 1000);
}
function hideObject(which) {
document.getElementById(which).className = 'pop';
}
</script>
<a href="/catalog/audi/100/100_23_44/" class="thumbnail" onMouseOver="showObject('as100_23_44')" onmouseout="hideObject('as100_23_44');">Audi 100 2.3<div id="as100_23_44"><img src="http://web.carsguru.ru/web/loading.gif" height="150" width="200" id="100_23_44"></div></a>
</body>
</html>
Padonak писал(а):onMouseOver="showObject('as100_23_44')"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<html>
<head>
</head>
<body>
<style>
.thumbnail div {
position:absolute;
visibility:hidden;
}
.thumbnail:hover div {
visibility:visible;
}
.pop {
visibility: hidden;
}
.go {
visibility: visible;
border:1px dashed black;
}
</style>
<script>
function showObject(which) {
document.getElementById(which).className = 'go';
name=which.substr(2);
setTimeout("document.getElementById('"+name+"').src='http://www.sonyericsson.com/downloads/Z710_man_walking.jpg'", 1000);
}
function hideObject(which) {
document.getElementById(which).className = 'pop';
}
</script>
<a href="/catalog/audi/100/100_23_44/" class="thumbnail" onMouseOver=setTimeout("showObject('as100_23_44')",5000); onmouseout="hideObject('as100_23_44');">Audi 100 2.3<div id="as100_23_44"><img src="http://web.carsguru.ru/web/loading.gif" id="100_23_44"></div></a>
</body>
</html>
<script>
var expiryTimer;
function showObject(which) {
document.getElementById(which).className = 'go';
name=which.substr(2);
expiryTimer=setTimeout("document.getElementById('"+name+"').src='http://www.sonyericsson.com/downloads/Z710_man_walking.jpg'", 1000);
}
function hideObject(which) {
clearTimeout(expiryTimer);
document.getElementById(which).className = 'pop';
}
</script>
<script>
var expiryTimer;
function showObject(which) {
document.getElementById(which).className = 'go';
name=which.substr(2);
expiryTimer=setInterval("document.getElementById('"+name+"').src='http://www.sonyericsson.com/downloads/Z710_man_walking.jpg'", 1000);
}
function hideObject(which) {
clearInterval(expiryTimer);
document.getElementById(which).className = 'pop';
}
</script>
function hideObject(which) {
clearInterval(expiryTimer);
document.getElementById(which).className = 'pop';
name=which.substr(2);
document.getElementById(name).src='http://web.carsguru.ru/web/loading.gif';
}
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 15