Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jquery]

Denotes questions related to the use of jQuery library in Magento.

5
votes
0answers
463 views

How to apply custom validation in Magento 2 checkout Shipping Address form?

I want to apply some custom validation on shipping address form of Magento 2 Checkout. Normally i do it with JQuery but don't know how to apply it in Magento 2. The validation i want to implement are ...
4
votes
0answers
38 views

How to create a basic progress bar with ajax, when il click add to cart in Magento 2?

I try to make a basic progress bar with ajax , when I click button add to cart, but I don't know how catch the xhr on console,to put on alert() or prepend()function I follow a video example in ...
4
votes
0answers
97 views

Knockout.js in magento2

How to change the jquery into ko? define([ 'jquery' ], function ($) { "use strict"; $.widget('xxx.homePage', { options: { bindSubmit: true, ...
4
votes
0answers
154 views

Magento 2.1 : Calendar Frontend

I have some data on front-end , which I want to show on specific days in the calendar. I got this code to show the calendar on the front end . <?php $a = 'some text'; $b = 'some ...
3
votes
0answers
685 views

mageInit KO binding not working for a custom jQuery widget

I can't get the mageInit binding to work on a custom jQuery widget which I have created. I have used it in my KO template like: <div data-bind="mageInit: {'mywidget':{'configuration-value':true}"&...
3
votes
0answers
34 views

Magento2 - Remove/edit classes from navigation

i have set up a new magento2 store and i added some jqery-ui items ( accordion and tabs) and for them to work, i included the jquery.css in my _extend.less inside my custom theme. Unfortunately now ...
3
votes
0answers
78 views

Initialise a Jquery Widget on Demand with Jquery

I have loaded my layered navigation over ajax to speed up my site load. The layered navigation also uses ajax and it's jQuery is normally initialised via RequireJS i believe with the below requireJS ...
2
votes
0answers
12 views

Customize native loader

I would like to challenge the template structure of Magento 2 loader which is declared in the lib/web/mage/loader.js but I can't find where this widget is calling by Magento to override the javascript ...
2
votes
0answers
38 views

Magento-2 jquery widget timing issue

I recently started using jquery widgets in magento and come to know that magento extends jquery-ui widgets through the use of widget factory and customises them according to need and then again return ...
2
votes
0answers
162 views

jQuery got no function after AJAX call

I'm having a problem in using horizontal navigation. When I sort something, at I changes show products with ajax the navigation isn't functional anymore. The click function in jQuery is still working ...
2
votes
0answers
158 views

Uncaught TypeError: $.initNamespaceStorage is not a function magento2

Some functionality is not working properly and it shows some errors in console Any help will be appreciated.
2
votes
0answers
33 views

Need to Initialization js while ajax response magento 2

Need to Initialization js for particular div when the div append ajax response magento 2. i have append the div in ajax response and also i need initialize js for that div. How to do that
2
votes
0answers
523 views

Lazy load Js not working in Magento2.2.0/1/2 Version

I have https://www.magebees.com/lazy-load-images-extension-for-magento-2.html this one extension, but not working properly- js errors like window undefined..
2
votes
0answers
337 views

Add modal popup on multiple list elements

I would like to add modal functionality in a list of images wrapped in a div. It should work like so: when i click on a span element the next image should show in a modal. Html example below. <?...
2
votes
0answers
730 views

How to update product quantity on check out page using Ajax in Magento

I want to provide functionality to update product quantity on checkout page of magento. so if user want to update the product quantity he can do it on without reloading checkout page. I want to ...
2
votes
0answers
368 views

Magento 2 QuickSearch widget

Does anyone have any experience with Magento 2 QuickSearch widget so perhaps they can provide a code sample (how to use it in module)? I have managed to include it to my js file, but i can not figure ...
2
votes
0answers
398 views

Add full version of jquery mobile to magento2

Magento2 loads by default a custom build of jquery mobile library: deps: [ "jquery/jquery.mobile.custom", If I try to add the full version of the mobile library (require it in my theme): var ...
2
votes
0answers
366 views

Magento call jquery-ui progressbar after prototype ajax request successfull

I have done ajax add to cart product from product page, I am able to update the top cart contents successfully on Prototype ajax request success, but when I try to initialize the jquery progressbar(...
2
votes
0answers
384 views

Different CSS Styles for Menu Icon

Is it possible to tell Magento to do pick-up different CSS styles for something that appears throughout (such as the header?). For example, a website I am working on features a 'MENU' icon over an ...
1
vote
0answers
70 views

Magento-2.2.7 “JQMIGRATE: jQuery.attrFn is deprecated” error in console

This error occurs in browser console once in every 6-8 times and jQuery doesn't work a all on the page. when I reload the page everything works fine.
1
vote
0answers
446 views

magento 2 Uncaught TypeError: Cannot read property 'version' of undefined

I got below error randomly in front-end and when all modal popup not working when below error occurs. Uncaught TypeError: Cannot read property 'version' of undefined I have override admin product-...
1
vote
0answers
72 views

How to change product price using drop down option in Magento 2?

I want to change product price when drop down option is change. Here drop down is dynamic means you can add N number of drop down and it's options from admin side. (Note: This is not a product custom ...
1
vote
0answers
19 views

how to validate before save stocktaking in magento 2 backend

Help me ! i saved the qty successfully using ajax popup, but i want hide 2 button in popup Close Save When you click the save button -> save When you click the save Close-> not save My jquery ...
1
vote
0answers
107 views

I am getting jquery error while adding custom field in payment method in magento 2?

I am trying to add custom fields in magento 2 but it is not working. I am getting JQMIGRATE: jQuery.browser is deprecated jquery-migrate.js:41:4 console.trace() jquery-migrate.js:43:5 ...
1
vote
0answers
35 views

New security threat to Magento caused by it using jQuery-File-Upload?

Magento 2 uses the Blueimp jQuery File Upload Plugin v5.16.4 which has recently been identified at posing a security risk to web applications which use it. Is this an issue for Magento and should ...
1
vote
0answers
40 views

Toggle switch to change between Incl. and Exc. TAX with ajax continious loading

I've coded up a quick toggle switch which will change the price display between Including and Excluding tax using "display: none" with jQuery hide and show but i'm having problems with an Ajax ...
1
vote
0answers
44 views

Issues creating a widget with repeated functionality in Javascript

Have a controller class setup as a widget. Labeled here as "buttonController". I'm trying to call and instantiate an instance of the controller widget per each button. Everything seemingly works, ...
1
vote
0answers
60 views

Is the JQMIGRATE necessary for Magento 2?

Just out of curiosity: Is the JQMIGRATE necessary for Magento 2? Because it is complaining about using a deprecated psuedo event. Please see the below screenshot. If it's not necessary for Magento ...
1
vote
0answers
254 views

Magento 2.2.4 Implementing Bootstrap 4 Carousel to Homepage | JS seems to not be functioning

I've been trying to get the Bootstrap 4 Carousel to work on my homepage and I've been facing an issues that seems like the JS may not be functioning. This is the way that I went about doing so. I ...
1
vote
0answers
107 views

Magento 1.9 - Update product price using jQuery

I am using a jQuery script to add static price to the product's regular price on the product detail page. On the product page, the price is updated, but the price is not updated in the cart when ...
1
vote
0answers
198 views

TypeError: $.ui is undefined in checkout

This is driving me mad! Something is mucking up the loading of jQuery and jQueryui in our checkout - we have tried everything we can find on the web - (we are using theme porto) Their support is ...
1
vote
0answers
192 views

JQuery gets loaded after script sometimes

I implemented owlcarousel like this <script> require([ "jquery", "Vendor_Module/js/owl.carousel.min" ],function($){ $('#slider').ready(function() { ...
1
vote
0answers
1k views

Magento 2:Get input field text value in js file from template file

I have a added a custom block in checkout section using a custom module.(http://i.prntscr.com/BRC2VcknSZiLsFpgzzPSAg.png) I want to get the input text field value in js file(from .html file). I have ...
1
vote
0answers
194 views

MAGENTO 2 Checkout javascript not showing shipping address

i have a problem in the checkout with the Magento 2.1.6 version. In the second step only the cart resume is showed and i have this error in the console: Uncaught RangeError: Maximum call stack size ...
1
vote
0answers
56 views

Product gallery disappear after page load

I have a problem with the product page. After the page load all the resource, all the product gallery images disappear except for the first one (each product have 4/5 pictures). I try to add <...
1
vote
0answers
84 views

Magento 2 : jQuery Tokenizer Ui Component Edit Form

The new style of M2 Ui forms using knockout Js has changed many things we do with M1 . My Jquery Tokenizer does not dispaly tokens in edit form, tokens are added successful when we create new token. ...
1
vote
0answers
58 views

How to use jQuery in setAfterElementHtml

I add script tag in my admin form like this: $field->setAfterElementHtml('<script> //<![CDATA[ jQuery( document ).ready(function($) { alert( "ready!" ); }); //]]&...
1
vote
0answers
57 views

Magento 2 Add Javascript

I have the following code in a custom module for admin backend, which is not running. tinymce.html <textarea class="admin__control-textarea wysiwyg" data-bind=" value: value, valueUpdate: ...
1
vote
0answers
273 views

How to use region updater in magento 2 custom module?

I am working on the region updater in magento 2. Region Field needs to change based on the selection of country. Below is my region updater code: var billingRegionUpdater = new RegionUpdater('#...
1
vote
0answers
141 views

Manage product zoom functionality in Magento 2

I want to convert Magento magnifier cursor as mouse cursor. Currently Magento roomer has big size. I want to use some thing like in mentioned URL "http://www.fitatti.com/cami.html". Please help.
1
vote
0answers
77 views

What causes this odd Uncaught Reference error when adding product to cart Magento

Since today, adding products to cart has stopped working on our site with the following error. Uncaught ReferenceError: jquery172016024149750625072_1490834796904 is not defined at ajaxcartsuper/...
1
vote
0answers
20 views

Magento 1.9 removing back slashes while saving a file path to DB

Here is the query in controller to save an uploaded file path from a custom directory to database custom table but it is not including the actual page query removed the slashes and the add plain ...
1
vote
0answers
27 views

Methods are called before Jquery is init

I have a lot of errors in my magento 2 site. Seems that functions are called in a strange way. (They're in head, and they're supposed to be in the body) How can i solve this?
1
vote
0answers
74 views

How to replace load jquery.js form local to link web CDN in require.js

When my page load require.js required jquery.js from local https://mypage/pub/static/frontend/../../en_US/jquery/jquery.min.js And I want to change required from link web CDN https://ajax....
1
vote
0answers
369 views

can't get jQuery's ajaxComplete working

I can't get jQuery's ajaxComplete to work. I'm thinking it's because the ajax call is being initialised by Prototype? But how can I check when any ajax call This is basically the code I have: ...
1
vote
0answers
72 views

In checkout page Shipping Address and Shipping method title want to make in toggle

Where to add this jQuery code to make checkout page in shipping title and shipping method toggle. $('.step-title').on("click",function(){ $(this).parent().find('#checkout-step-...
1
vote
0answers
438 views

How to disable auto collapse in mobile menu?

In mobile menu of Magento 2 when we click any child item of a parent, the parent collapse [see the image] what can i do to disable this behaviour. Demo: http://magento2-demo.nexcess.net/contact
1
vote
0answers
423 views

Magento 2 calculate custom text fields length and width on product view page

How is possible in magento 2.0? I successfully active in magento 1.9 for bellow thing. I am trying to create a product with two custom text fields: Length and Width. When the user types, both a length ...
1
vote
0answers
200 views

Magento 2 RequireJs callback not called

I have the following in requirejs-config.js var config = { "map": { "*": { "jquery/easing": "./js/jquery.easing.1.3", "jquery/mobile/customized": "./js/jquery....
1
vote
0answers
754 views

CloudZoom Magento integration

I'm using http://www.starplugins.com/cloudzoom/quickstart to add hover zoom feature on single product page. Rollover on first product thumbnail shows the same image. However on second or subsequent ...