Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
181 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....
2
votes
2answers
2k views

Magento 2 : How to Implement Swiper Plugin

I'm trying to convert html template to Magento 2.1.3. I started my conversion using blank-sass from Snowdog. Some CSS was sucessfully implemented but I can't figure out many points. One of them is how ...
0
votes
1answer
49 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 ...
1
vote
1answer
2k views

How to use frontend calendar localization?

I'm becoming crazy with the frontend translation of the mage/calendar widget in Magento 2. Does somebody know how to localize it? I have a calendar that's showing up on the front (from a bought ...
0
votes
0answers
13 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
85 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
2answers
165 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 ...
6
votes
3answers
1k views

How to add on scroll animation in magento 2 using AOS (Animation On Scroll) Jquery?

I have tried to add on scroll animation in my Magento 2 cms page. I used AOS Jquery for that. I have added the js and CSS file and initialize AOS through cms page but It will shows Uncaught ...
0
votes
0answers
955 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
31 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
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
25 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
14 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
208 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
149 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 ...
12
votes
2answers
7k views

magento2: how validation work in magento2

In magento1 we can check validation like this: var formToValidate = $('form-validate'); var validator = new Validation(formToValidate); if(validator.validate()) { // Here we can code ...
0
votes
2answers
1k views

Magento 2 - How to use jQuery in CMS page

how to add cms home page jquery in magento 2 jQuery(document).ready(function($){ $(".home-banner").insertBefore(".page-main"); }); Please advance thanks for help
0
votes
2answers
60 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
29 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 ...
2
votes
1answer
730 views

Update price without refresh the page

I am working on magento2 customization calculation functionality. In this i have width and gather two field is there in text field I have to calculation with product price eg. pricewidthgather like ...
3
votes
2answers
3k views

Magento 2 checkout page how to get country_id from selected shipping addresses?

How to get country id/country name from selected shipping address in the checkout page. lets assume if the customer has multiple shipping addresses, based on the shipping address choose, if country ...
0
votes
0answers
42 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 ...
1
vote
1answer
2k views

Magento2 : how to use phtml jquery functions and vars from another phtml jquery script

I have created a new page containing several blocks : Simplified Block 1 phtml : <form id="form" class="form " name="form"> <div class="inputselect"> <select class="...
0
votes
1answer
89 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
43 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
960 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
70 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
82 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.
2
votes
1answer
138 views

Magento 2 - Understanding text/x-magento-init

I try to better understand the concept of text/x-magento-init. I understand that it allows us to define script components that do a certain task, which we then can use as often as we like in any ...
0
votes
2answers
69 views

how to refresh a part of the page when configurable variation is selected in magento 2.3

I want to reload a div section on the product detail page of the configurable product when the configurable variation is selected. How do I achieve that? require(['jquery','jquery/ui'],function($){ ...
1
vote
1answer
65 views

How to Override jquery widget method in Magento 2?

I'm trying to override Magento_Checkout/js/sidebar.js _initContent method. I need to delete two events from it and create my own events instead. Is it possible without copying the full method from the ...
0
votes
2answers
562 views

Filling Shipping address fields with values using Jquery or Knockout Js

Is it possible to just fill the shipping address fields with my own values? For example: I want city field to be filled with My City when an event occurs on the checkout page. I know the checkout ...
0
votes
1answer
16 views

How to show and hide select box field in adminhtml form in backend

By default, Footer group select box should not be displayed. And when clicked on position select box footer it should display Footer group select box $Lastfield = $fieldset->addField( ...
0
votes
0answers
55 views

Magento2.3.3 - Autocomplete select function not working

We used the autocomplete(UI) Js to list the products on our site. It works up to version Magento2.2.x, When changing the version to Magento2.3.3 It doesn't function properly, for dynamic input field, ...
0
votes
0answers
49 views

Jquery ui widget implementation instead of just jquery code

I have code that performs the function of interactivity. When you click on the checkbox, the block is cloned and added to another block. Here is an example on codepen: https://codepen.io/annbin/pen/...
0
votes
1answer
16 views

Jquery To get substring from a long string within two specific sub strings

I have a long string as - " https://example.com/js-form-name-62682.html?ref=https%3A%2F%2Fstaging.example.com%2sample%3Fsku%3D40567&referrer=embeddedtype-and-somemortext " I want to get the value ...
3
votes
1answer
2k views

Magento 2 jQuery Modal Not displaying in center

I'm new to Magento 2. For homepage popup i have added below code <div id="popup-modal"> Test Data </div> <script> require(['jquery', 'Magento_Ui/js/modal/modal'], ...
0
votes
0answers
28 views

How to rewrite jquery code in jquery ui widget

How to remake this code in ui jquery widget? There is such jquery code. When you select an item using the checkbox, the item is cloned and added to another block. Tell me how to rewrite it in jquery ...
2
votes
2answers
5k views

Magento 2 & JQuery.UI.Autocomplete

I would like to use JQuery.UI.Autocomplete component in my module for Magento 2. Also, I am using KO.js for the user interface of my application. So, I have added a custom binding for KO: define([ '...
1
vote
0answers
65 views

Magento 2.3: How to hide only free shipping method if postal code 2nd index is 0

I want to hide only the free shipping method on the checkout page if the postal code 2nd index is 0. I tried this but it's not removing from shipping methods. require(['mage/url', 'jquery','domReady!'...
0
votes
0answers
55 views

Update Magento 2 jquery-ui.js version in Custom Theme

Is there a way to override Magento 2 lib\web\jquery\jquery-ui.js version in my Custom Theme? I want to upgrade it to version 1.12.1.
0
votes
2answers
45 views

Help in remaking the code on the widget

The challenge is that I have checkboxes on the page. This code finds all the checkboxes on the page and if the checkbox is selected, it adds it to a separate block. I want to limit the amount that can ...
1
vote
0answers
135 views

Non - AMD Module - JSPDF - Magento 2

We are trying to implement JSPDF on our product pages. We have created a module to load the JS on these pages but we are coming up short. We are getting constructor errors or not defined errors ...
0
votes
0answers
26 views

JS Problem in magento 2

I have a problem with magento 2 and I can not even mehcer in the administrative area of ​​the site .. so any editing would have to be by ssh or direct file editing PS: I'm very beginner
7
votes
4answers
20k views

Magento2 : ReferenceError: jQuery is not defined

I am trying to add custom jquery code into my module but it is not working. app/code/Custom/Module/view/frontend/web/js/my.js jQuery.noConflict(); jQuery(document).ready(function(){ alert('ok'); ...
0
votes
2answers
222 views

How to add Isotope jQuery in Magento 2

I have added and configured the Isotope jQuery in Magento 2.3.3. But, its working and showing error as below: Uncaught TypeError: $(...).isotope is not a function I have tried all the solutions but ...
1
vote
0answers
55 views

How to add selected items on a page to a separate block in Magento 2?

Please help with the implementation of this functionality. I have a separate module with a separate route. There will be elements on the page (picture and checkbox under it) as in the screenshot. ...
0
votes
0answers
25 views

Magento 2 : Load more in my order

I want to make a function load more in my order(may not be used ajax) here is description image How can I do it? Any help? Thank in advance.

1 2
3
4 5
15