Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
1k views

Magento 2:- How to create Vertical or Horizontal tagging with Tabs widget

I tried to create tabbing using Tabs widget but It does not display what i want. I follow this Link:- Tab widget and Building Tabbed Interface with Magento 2 Javascript UI Widget/Modal/view/frontend/...
0
votes
1answer
1k views

jQuery version update at M2

I want to upgrade magento 2 jQuery version from 1.9 to 3 do you think is an good idea? how i do it for upgrade jquery build-in file who come with magento 2 ?
2
votes
0answers
15 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
2answers
747 views

jQuery multiple input types in one form

I got multiple input types in my form based on positions. <input type="file" name="file" id="file" data-positionid="<?php echo $positionId; ?>" class="inputfile" /> Now i want on change ...
3
votes
1answer
69 views

Magento 2.3.4: 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
22 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
24 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.
5
votes
1answer
2k views

Magento 2.2.1 Checkout page broken and Js fail to load error

I have installed Magento 2.2.1 and set up my custom theme but checkout page looks broken and consoles showing errors: Not sure how to resolve this issue. Need help how can this be resolved. How ...
0
votes
0answers
10 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 = $(...
0
votes
1answer
1k views

magento 2: Slick JS does not work when loaded from require JS

There is no error in console and when I tried to put the log "Slick is on "on the on-init function, it displayed correctly. My theme require-config js : var config = { deps: [ "js/mainsite", ...
1
vote
1answer
1k views

How to Auto Select Color Option for Products with Only One Color (configurable product)?

I have some configurable products with a custom color swatches attribute. Lot of them have just one color options, so i 'd like to mark the option as selected in the product page. I added a custom js ...
1
vote
5answers
2k views

magento 2 Error: cannot call methods on priceBox prior to initialization; attempted to call method 'option'

I am having an issue on my website the issue Error: cannot call methods on priceBox prior to initialization; attempted to call method 'option' My website https://www.cartaroo.com.cy/?...
1
vote
1answer
957 views

$.widget is not a function jquery error in magento 2

I know this question has been around a lot with solution but none worked in my case. I have installed Sm Revo theme with Magento v 2.1.0 and I'm getting this error. So far I have tried following ...
1
vote
1answer
27 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
1answer
771 views

Product detail page image not loading on front end

Product detail page images are not loading. The pointer is just spinning. I have read lots of threads. Clear cache, reindexed, change permissions. Finally, I got a problem. but unable to fix it. :-/ ...
0
votes
1answer
210 views

Error while using croppie.js library in magento 2

Trying to use the croppie library on product detail page and sometime it works perfectly but most of the time it throws one of these errors. TypeError: priceBoxes.priceBox is not a function ...
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
4answers
5k views

jquery fancybox for magento 2

Its working in my localhost, but when use same code in magento 2 its not working any suggestions please <!DOCTYPE html> <html> <head> <title>fancyBox - Fancy jQuery ...
0
votes
3answers
5k views

Magento 2 : How to override fotorama.js in magento custom theme

I need to show gallery arrow always visible on product gallery page. I tried in gallery.phtml variable arrows="always", but its not working. I want to show both arrow always visible on product ...
1
vote
1answer
2k views

Sending variable to a bootstrap modal

I have seen this asked before but a lot of the answers I found where people looking to get a variable into a modal to query a database. However thats not what I want. I just want to send a variable ...
0
votes
1answer
2k views

Lots of jQuery conflicts on Magento 2

I'm working on a new Magento 2 installation with the Porto theme and have noticed that when you first visit the site or have the browser cache disabled you get a lot of of jQuery conflict errors. ...
0
votes
0answers
28 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
1answer
2k views

Getting jQuery.browser is deprecated error in console magento 2.1.5

I keep on getting this error in my console, JQMIGRATE: jQuery.browser is deprecated migrateWarn @ jquery-migrate.js:41 get @ jquery-migrate.js:58 (anonymous) @ jquery.ba-hashchange.min.js:9 (...
0
votes
0answers
28 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 ...
1
vote
1answer
1k views

Magento 2: How to use event trigger on the checkout page?

How to use event trigger when change "State/Province " drop-down on the checkout page? I'm trying to page reload when user change Region from "State/Province" dropdown in the checkout page. First, ...
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
16 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
60 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
2k views

QuickSearch widget Magento 2. How to make closed search

I read a lot documentation and see code search. But don't understand how make an opening search by clicking on the icon. Mobile version have opening search by clicking on the icon. How make same for ...
0
votes
1answer
44 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() { ...
1
vote
2answers
1k views

Magento 2 tabs - change programmatically

I'm wondering how to exactly change tab (core mage/tabs widget) programmatically. Docs say that I can use both activate and enable functions for that: http://devdocs.magento.com/guides/v2.0/javascript-...
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
27 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 ...
2
votes
2answers
744 views

Get customer chosen shipping method with jQuery

How could i find out the shipping method that the customer has chosen right after click of change? I have tried to get shipping methods id or value that customer has chosen when he/she has clicked ...
0
votes
0answers
23 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
88 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
1answer
27 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
51 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
25 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
1k 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 ...
3
votes
1answer
2k views

Using jquery in phtml got an error: Uncaught ReferenceError: require is not defined

I use jquery in my phtml frontend page like this: <script> require(['jquery', 'jquery/ui'], function($){ var currentUrl = '<?= $itemEditUrl ?>'; $('#link-cusom-campaign')....
0
votes
2answers
886 views

Owl Carousel not working in Chrome

I've got a carousel (Owl Carousel) on my home page that doesn't work on Chrome but does work in other browsers. I believe it is something to do with Jquey loading after the carousel but I'm not 100%. ...
1
vote
1answer
5k views

Blocked a frame with origin from accessing a cross-origin frame

when I want to go onclick to next page's specific div it shows this error . jquery.js:3123 Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a ...
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 ...
3
votes
2answers
2k views

Inserting Javascript codes in one CMS page of Magento 2.1

I am trying to add some javascript codes in one CMS page of a Magento 2.1 site. Here are what I did and the issues I am facing now: 1)at the "Layout Update XML" of the page, add the following jquery ...
2
votes
1answer
1k views

Validation Error with jQuery-UI Autocomplete and KnockoutJs - Magento 2

The Problem: I've implemented jQuery-ui Autocomplete with Knockout Js in Checkout Page but some input fields that are binded to my Component throw a validation error ("Required Field") when i update ...
0
votes
0answers
18 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
62 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
821 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 ...

1
2 3 4 5
15