Код: Выделить всё
$(document).ready(function() {
$(".list-item").mousemove(function(e) {
var offset = $(".list-item").offset();
$("#hoverDisplay").animate({
left: e.pageX - offset.left,
top: e.pageY - offset.top
}, 1);
});
});
function toggleHiddenDisplay(id) {
elem = document.getElementById('hoverDisplay')
if (elem.style.display == 'block') {
elem.style.display = 'none';
} else elem.style.display = 'block';
}
Это html:
Код: Выделить всё
[url=project/index.html]Text.[/url]
[img]path/1.gif[/img]
< /code>
Это CSS, хотя я не думаю, что очень полезен: < /p>
#hoverDisplay {
margin-top: 5px;
margin-left: 5px;
position: absolute;
}
.list-item>div.hidden-img {
display: none;
height: 500px;
width: 350px;
position: absolute;
z-index: 10;
}
Подробнее здесь: https://stackoverflow.com/questions/586 ... w-on-hover
Мобильная версия