Image Preview on hover bootstrap
img Preview on hover bootstrap
$container = $('<div/>').attr('id', 'imgPreviewWithStyles').append('<img/>').hide().css('position', 'absolute').appendTo('body'), $img = $('img', $container), $('a:not(.brand)').mousemove(function (e) { $container.css({ top: e.pageY + 10 + 'px', left: e.pageX + 10 + 'px' }); }).hover(function () { var link = this; $container.show(); $img.load(function () { $img.addClass('img-rounded'); $img.show(); }).attr('src', $(link).prop('href')); }, function () { $container.hide(); $img.unbind('load').attr('src', '').hide(); });DEMO
Image Preview on hover bootstrap
Reviewed by Bhaumik Patel
on
7:45 PM
Rating:
