Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
19 views

How to redirect to controller using jquery ajax in magento 2.3.5

I want to pass dynamic text-box value to controller using ajax, so if anyone have idea about it then please share with me. Thanks In Advance
0
votes
2answers
50 views

How to implement jQuery click event in magento knockout JS function

how to implement below jQuery code into knockout js, Actually I'm trying to call this function on a button click event using knockout js, but it's not working HTML code: <div> <ul class=&...
0
votes
0answers
25 views

How to create autocomplete on click on textbox in magento2.3.5

I want to create a dynamic textbox and using the id attribute to use autocomplete functionality in this. I have Developed a dynamic id for each textbox on click of add Item button and my id is ...
0
votes
0answers
10 views

How to use owl carousel for my category wise product on home page in mageno2?

Hello I want to display My Category's product in owl carousel, i already display product on homepage but i want that product in my owl carousel slider please help me without using any extension please ...
0
votes
0answers
21 views

Jquery callback function cannot read property of undefined using knockout js

1.lets assume placeOrderClick function is called.within this there is a eprotect API success callback function called submitAfterEprotect. i'm trying to call placeorder function using self in ...
0
votes
2answers
16 views

Magento 2.3 jquery accordion seems blocked

I am aware of the built in Magento accordion but do not want to use it. I want to use jQuery accordion. In my theme web/js/custom.js I have the following define([ "jquery", 'accordion', ], ...
0
votes
0answers
6 views

Unread jQuery script in custom phtml file included with ajax in Magento 2

I have included in the product page a custom external phtml file from a module which is called with ajax on click. The html and php code is read correctly, only the jQuery code is not read and is not ...
1
vote
0answers
13 views

How to create a mixin for js/modal/confirm.js

I want to create a mixin for js/modal/confirm.js but that widget returns some javascript to make it possible to create an instance of the widget instead of the widget itself. So it returns this // ...
1
vote
0answers
12 views

jQuery widget: adding ReuireJS dependency and calling public method

I have a custom widget defined like this define([ 'jquery', 'jquery/ui'
], function($){ $.widget('myNameSpace.myWidget', { somePublicMethod: function () { ...
1
vote
0answers
22 views

Magento 2 - Ajax call on controller working in desktop but not on mobile

Here is the ajax call in which data is not passed in controller This is found only in mobile device and working fine in desktop. Thanks in advance. $.ajax({ type: "POST", ...
2
votes
0answers
20 views

Select country through Jquery in Origin Address of Shipping Settings

I am trying to set Country for Origin address using jQuery in Shipping Settings of Sales (Store Configuration). The issue is, on change of country option using jquery, the ajax to fetch region is not ...
0
votes
0answers
23 views

How to validate and Submit Login Form Using Ajax

i want to create login form using ajax with validation in magento 2.3.5. so can anyone have idea about it then please share with me. Thank you in advance.
0
votes
0answers
25 views

How to display login on hover in magento 2

In this i want to create a custom module in that one button is in header for login and on hover of that button i want to display login form with ajax.
0
votes
0answers
11 views

Magento 2: Error Disable some dates in jquery Datepicker

I try to add datepicker in magento 2 checkout page like this: ko.bindingHandlers.datepicker = { init: function (element, valueAccessor, allBindingsAccessor) { var $el = $(...
1
vote
1answer
42 views

Magento 2 - Custom Module JS error

I am trying to add custom js file using my custom module. But getting below error in console. Uncaught ReferenceError: Plyr is not defined DevTools failed to load SourceMap: Could not load content ...
0
votes
0answers
35 views

How to remake js code on jquery ui widget

I have a simple code that animates the appearance of a mini-cart modal window. <script type="text/javascript"> require(['jquery'], function($){ $(document).ready(function(){ ...
3
votes
1answer
91 views

How to bind an event handler to 'street[0]' input on the checkout page?

I've been trying to ensure an alert displays on a user typing in PO BOX number in the street address field on the checkout page, saying we don't ship to PO BOX. My jQuery code doesn't seem to bind a ...
0
votes
0answers
34 views

Animation for a mini-cart not working

How to make an animation to show and hide the mini-сart? Expected result: by clicking on the minimap, the block flies from above to its position Found a way using jquery UI I found a way using ...
0
votes
0answers
31 views

Magento 2.3.4 theme use different logo file for mobile and larger screens

I need to use 2 different logo files, one for mobile and one for desktop view. I have one single custom theme (parent is luma) and I am wondering how to achieve this by using jquery and/or CSS. Is ...
0
votes
0answers
18 views

Magento 2 - How to use Ajax Auto completer?

I'm working on migration from Magento 1.9.* to Magento 2.3.* , in one of my phtml code I have this javascript Ajax.Autocompleter function, as I know this function is not available in Magento 2.3, how ...
0
votes
0answers
20 views

Cannot read property 'version' of undefined error while hard refreshing the page in magento 2

Whenever I am hard-refreshing the page, it displaying the below js error. jquery-ui.js:37 Uncaught TypeError: Cannot read property 'version' of undefined at jquery-ui.js:37 at mixins.js:87 at Array....
0
votes
2answers
81 views

In Jquery, How to capture the data within <span>product_price</span> in the event of a change in the product price?

Below is the code written to capture the updated price from within <span class="price">Price</span> as the price changes on one choosing a variant of a product from the drop-down. I find ...
0
votes
1answer
47 views

Uncaught TypeError: $ is not a function

A function is created to be called when a change event occurs on a span tag as seen in the code snippet below. $(".price-box").on("change", ".normal-price .price-wrapper span.price", function() { ...
0
votes
0answers
10 views

dynamic content when choose option configurable product magento 2

I want to get id and attribute of children product when choosing the option in configurable product like that: please watch the video below: https://www.loom.com/share/...
0
votes
1answer
28 views

If client login JQuery/Mage-init don't work

I don't even know how to explain this. But the case is, in some pages if the user is logged in some of the features don't work. For example in cart we have a tab that opens a closes with the form to ...
0
votes
2answers
181 views

Cannot read property 'bind' from copy of mage/menu.js

I am trying to create a custom menu in Magento 2, but I run into the following browser console error when I add the JavaScript file for it. main.js:27 Uncaught TypeError: Cannot read property 'bind'...
0
votes
0answers
24 views

First shipping Method will displayed Magento 2

Plz help me Say We will select Postal by default and and based on that only One bitcoin payment method would be there. If we click/check DHL shipping method then both Payment method would be there. ...
0
votes
1answer
30 views

How to trace a JS function appeared out of nowhere in one of the Magento 2 category page?

one of the category page of our Magento site throws an JS error Uncaught ReferenceError: j$ is not defined. Upon investigating, this was found present with <script> j$('h1').hide(); </...
0
votes
1answer
66 views

Use of Jquery 1.10 with Known Vulnerability

We launched a website 2 weeks ago and our client launch a pen test to check if everything was safe. Unfortunately It looks that we have two issues because of : Vulnerable javascript library: jQuery....
0
votes
1answer
35 views

Adding slick carousel to Magento 2 homepage

I'm having an issue with what I think should be a basic thing but I'm obviously doing something wrong, all I want to do is have a basic banner slider using slick slider jquery plugin. I have a custom ...
0
votes
0answers
12 views

Magento2 PDP tabs make first one always active

I have edited the details.phtml to show custom attributes in two tabs instead of using the detail Magento details and more information tabs. However my issue I am not sure how to make sure that the ...
0
votes
0answers
24 views

Magento 2: Issue with double configurable swatches on related product tab

I am having an issue with double configurable swatches on the related product tab. It is working properly with single swatches such as color swatches only but it creates an issue on products with ...
0
votes
0answers
240 views

How to detect the browser tab close event in jquery

How do i detect the browser event when customer closing the browser tab by clicking X in jquey? I just want to show popup to the customer while they closing the browser tab. I have used below code. ...
-1
votes
1answer
30 views

Magento 2 - How to use jQuery $ in script injected with requireJs?

I try to include a script and use jQuery in it by using $ instead of jQuery THEME\Magento_Catalog\templates\product\view\gallery.phtml <script> require([ 'jquery', '...
0
votes
2answers
84 views

Magento 2 : Uncaught Error: cannot call methods on modal prior to initialization; attempted to call method 'show'

I am using below code to show modal, I am using semantic UI, I get below error ** Uncaught Error: cannot call methods on modal prior to initialization; attempted to call method 'show' at ...
0
votes
0answers
12 views

Issue : When my widget load , my Jquerry no more avaible

I try to add Widget on product page that is a calendar which use jquery in an another webservice . In my phtml i use file_get_content But when i do this my widget does load corectly but all my other ...
0
votes
0answers
23 views

How i can check which button is triggered to Open Modal

I Have a Modal Which can be open by two button modal_button_a and modal_button_b how can I check which button is clicked to open the modal using jquery <modal name="test_modal"> <...
0
votes
0answers
5 views

How to disable magento scrol validation on customer registraion foam?

I have comment the code if (firstActive.length) { $('body').stop().animate({ scrollTop: firstActive.offset().top - windowHeight / 2 }); ...
0
votes
0answers
10 views

Price Utils issue

Hi, I am trying to format the price using 'Magento_Catalog/js/price-utils'. require( [ 'jquery', 'Magento_Catalog/js/price-utils' ], function ($, priceUtils) { ...
0
votes
1answer
15 views

jquery in how to get the children without tag id using?

j query in how to get the children without tag id using ? i have using table structure to get the children but last children not getting. I have try this Code $(document).ajaxComplete(function (...
0
votes
1answer
69 views

How to apply Custom CSS on magento 2 checkout page(shipping and checkout)

i have added two fields in my magento 2 checkout at shipping address tab. My fields are check boxes and and i want to add some css to those check boxes therefore i have added custom css file but as i ...
0
votes
2answers
49 views

How to add Jquery code snippet in the HTML editor for footer_cms_content

When I place this code :- $(".social-icons").after('<span id="siteseal" style="style="cursor: hand;"></span>'); $.getScript("https://seal.godaddy.com/getSeal?sealID=...
1
vote
0answers
25 views

After including a JS file in my Magento 2 custom widget, i m getting $. is undefined

I have created a custom widget that requires jQuery code. I have included the js file but when I'm trying to view the changes in the frontend, I'm getting jquery error. I tried including the file ...
0
votes
0answers
33 views

Magento 1.9 : Minified JS version error

I have minified JS file from magento backend from here System > Configuration > Advanced > Developer > Javascript settings After minified js it is working in chrome but not working ...
0
votes
1answer
112 views

Maximum call stack size exceeded in magento2

Uncaught RangeError: Maximum call stack size exceeded. at HTMLButtonElement.trigger (717c7c7c456e00bb8693680c02ff88c8.js:3365) at Object.trigger (717c7c7c456e00bb8693680c02ff88c8.js:3365) at Object....
0
votes
1answer
51 views

magento 2 mini cart dropdown hide if we click on my account tab

I have used default Magento 2 mini cart dropdown and my account dropdown it's working fine. But I'm facing the issue if we click my account tab mini cart dropdown still open I want to hide when we ...
1
vote
1answer
33 views

Magento 2.3.3 -Load Custom Jquery after the Shipping Form load

I have added jquery on other click events they are working fine but when i am trying load jQuery after the Shipping page load. I want to hide my custom added fields in shipping page but they are not ...
0
votes
1answer
426 views

Magento2 - How to clear data from jQuery modal popup after closing modal?

Here am using jQuery popup in my .phtml file on the first run it sending data properly, on send time it fetching old data as-swell as new data. So how to prevent this condition. Code: <div ...
0
votes
0answers
43 views

Magento2: Override issue for lib/web/jquery.js

I am trying to override below file in my custom theme. lib/web/jquery.js Seems it been override. But It stop other jquery from working. Due to this a lot of console error arise. Here is my code ...
0
votes
1answer
44 views

dial codes with phone number in magento2

How can I put an option to choose country dial codes with the phone number in magneto 2.3.2.

1
2 3 4 5
15