mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-19 11:27:55 +00:00
Item Alternate Image Features in e-commerce site. (#15044)
* [ADD] Added Item Alternate Image Features in e-commerce site. * [IMP] Improved Code for Item Alternate Image Feature. * [IMP] Improved code for Item alternative image functionality. * Remove .css file and make a build for erpnext-web.css * Cleanup styling for item alternate image, also add delegated handler * Spaces -> Tabs * Spaces -> Tabs in item.html
This commit is contained in:
@@ -109,6 +109,13 @@ frappe.ready(function() {
|
||||
|
||||
window.location.href = window.location.pathname + "?variant=" + item_code;
|
||||
});
|
||||
|
||||
// change the item image src when alternate images are hovered
|
||||
$(document.body).on('mouseover', '.item-alternative-image', (e) => {
|
||||
const $alternative_image = $(e.currentTarget);
|
||||
const src = $alternative_image.find('img').prop('src');
|
||||
$('.item-image img').prop('src', src);
|
||||
});
|
||||
});
|
||||
|
||||
var toggle_update_cart = function(qty) {
|
||||
|
||||
Reference in New Issue
Block a user