You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-panel/share/static/js/demos/demo.gallery.js

35 lines
714 B

$(function () {
$('.gallery-container > li').hoverIntent({
over: showPreview,
timeout: 500,
out: hidePreview,
sensitivity: 4
});
function showPreview () {
$(this).find ('.preview').fadeIn ();
}
function hidePreview () {
$(this).find ('.preview').fadeOut ();
}
setTimeout (function () {
$('.gallery-container > li').each (function () {
var preview, img, width, height;
preview = $(this).find ('.preview');
img = $(this).find ('img');
width = img.width ();
height = img.height ();
preview.css ({ width: width });
preview.css ({ height: height });
preview.addClass ('ui-lightbox');
});
}, 500);
});