New answers tagged

0

So in order to have the arrows always active on main fotorama image, just edit the line 16 in app/design/{vendor}/{Theme}/web/fotorama/fotorama.js //wrapNoControlsClass = wrapClass + '--no-controls', wrapNoControlsClass = '', this is actually the css class .fotorama__wrap--no-controls in-charge with the slide-in animation of the arrows on hover.


0

You don't need jQuery for this, here are a few methods: // This will return a NodeList containing all your `li` elements with a class of `active`. document.querySelectorAll('li.active'); You mentioned you can't use $('li.active') (why?) so this may not work for you. If this is the case you could loop through each li looking for the active class: const ...


0

I answer my own question in case someone else ever finds himself in the same shoe as I was. Please free to ask for any clarification if needed. $("#product-options-wrapper select").change(function() { alert('Hello! Event triggered'); // setTimeout() used to ensure a time interval between Magento populating the span // and jQuery ...


0

to getting update when price is updated in configurable product you can create mixin for swatch-renderer.js and then you can add your code inside updateprice function. ex. Add below files. Vendor/Module/view/frontend/requirejs-cionfig.js var config = { config: { mixins: { 'Magento_Swatches/js/swatch-renderer': { '...


0

try this define([ 'jquery', 'domReady!' ], function($) { // Normally add the bind to a parent which will be stable. $(".price-box").on("change", ".normal-price .price-wrapper span.price", function() { console.log('Hello, I am happy to be called'); // Get the value of the span element var price = $(".price-box .normal-price .price-wrapper ...


0

$('.product.data.items').tabs('activate', index); index starting from 0 also you can check index by below code $('.product.data.items [data-role="content"]').each(function (index) { alert(this.id+index); })


0

You can make this fix by overriding the function _initializeOptions in your module Vendor_ModuleName/view/frontend/requirejs-config.js var config = { "map": { '*': { configurable: 'Vendor_ModuleName/js/configurable' }, } } Vendor_ModuleName/view/frontend/js/configurable.js define([ 'jquery', 'jquery/ui', '...


0

When your Magento site gives error that have no sense to you, it is often because the browser has stopped at one request and subsequent javascript requests do fail. These errors can be due to customerData not getting loaded successfully. a new module may create the error and it can be useful to disable the module to confirm the root of the issue clear the ...


Top 50 recent answers are included