first commit
This commit is contained in:
14
web/templates/x/static/js/utils/photo-rotator.js
Normal file
14
web/templates/x/static/js/utils/photo-rotator.js
Normal file
@@ -0,0 +1,14 @@
|
||||
$('html:not(.has-touch)').on(
|
||||
{
|
||||
mouseenter: function() {
|
||||
const image = $(this).find('[data-rotator]');
|
||||
image.attr('src', image.data('rotator'));
|
||||
},
|
||||
|
||||
mouseleave: function() {
|
||||
const image = $(this).find('[data-rotator]');
|
||||
image.attr('src', image.data('src'));
|
||||
}
|
||||
},
|
||||
'[data-catalog-rotator]'
|
||||
);
|
||||
Reference in New Issue
Block a user