Questions tagged [jquery]

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

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

Cannot validate email - MAGENTO api - how

I've been trying without success to validate the email from my website against the MAGENTO customers API and throw a message (exist or not exist) I mean, i have a website where customers are created; ...
0
votes
1answer
21 views

Toggle show more btn is automatically close itself in magento 2 layered navigation

I tried this jqery code and try to put "li" instead of "a"...but sometimes button works with this error in console"Uncaught error jquery is not defined" but most of the times it's not working with no ...
0
votes
2answers
196 views

Bug Uncaught TypeError: Cannot read property 'lang' of undefined on product page

I'm using Magento 2.3.2. But I found I have this bug Uncaught TypeError: Cannot read property 'lang' of undefined on the product page. Do you have any idea why?
1
vote
1answer
240 views

Magento2: Update Qty of product in bundle

I am updating the quantity of a radio button in a bundle via jQuery: $ ('input. Qty'). Val (4) Unfortunately the product summary does not change. When I put the value ("4") in the same input field ...
0
votes
1answer
789 views

Magento 2 : frontend calendar localization

I'm becoming crazy with the frontend translation of the mage/calendar widget in m2. Does somebody know how to localize it? I have a calendar that's showing up on the front (from a bought module that ...
1
vote
1answer
43 views

How to use Javascript in Magento 2.3 [duplicate]

I want to use JavaScript in my own custom Magento Module. Unfortunately I do not have any clue how I can access it. Another important thing to note is that I need to have access to JQuery.
3
votes
2answers
11k views

Magento 2: How to defaultly open “content 2” tab?

I am using accordion for tab open and close.How to open default "content 2" tab? <div class="block filter" id="layered-filter-block" data-mage-init='{"collapsible":{"openedState": "active", "...
0
votes
1answer
16 views

How to upgrade a jQuery library version?

The version of jQuery in lib is 1.14.0. I want to upgrade to 3.0.0.Tried making changes in theme require.js and keeping the new version file in web/js folder of theme, but, it's affecting other js ...
0
votes
3answers
31 views

Know if user are logged in with Jquery

I'm doing a custom JS code but i wanna know if user are logged in with Jquery.
1
vote
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 ...
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 ...
0
votes
1answer
165 views

How to get custom product attribute values in magento 2 jquery?

I want to get custom product attribute ('deliverytime') values for checkout config in jquery Here is the code for getting default product attributes jquery date-block.js function ...
0
votes
0answers
10 views

How to get the price of this JSON products to be exibihited on my html in a dropdown list?

I have this JSON table that I need to add on my HTML as a dropdown list and when the chosen product is selected, it shows its price and shows a button to simulate a shopping procedure (increase items ...
3
votes
2answers
79 views

Magento 2 When Add Date-picker On Frontend Custom Form

When i try to add date-picker on custom frontend form then give some Uncaught TypeError: Cannot read property 'call' of undefined at HTMLInputElement.$.datepicker._showDatepicker (calendar....
1
vote
1answer
32 views

Unable to add elastislide js file in magento 2.3

I am trying to add elastislide, for that, I added this code in phtml file <div class="brand_block"> <ul id="carousel_<?php echo $chunk2->getId(); ?>" class="elastislide-list"> ...
0
votes
1answer
112 views

How to solve jQuery autocomplete is not a function in Magento2.2.5

Here is my script, I don't know what is the problem but it show JQuery autocomplete is not a function in console. Any help would be appreciated. <link href="http://code.jquery.com/ui/1.12.1/...
1
vote
2answers
822 views

Show div after delay on Magento 2 with JQuery

I need to show this div after 3 seconds on my page. <div id="cratepop"> <br> <center><img src="/shoppingcart.png"></center> <br> </div> ...
0
votes
1answer
28 views

Dependent dropdowns in Magento 2 Frontend

How can I create a pair of dropdowns such that when one is selected, the options for the other one are updated? PHTML <?php $stateList = $block->getStates(); ?> <div> &...
0
votes
1answer
59 views

Magento 2: How To Disable Button On Form Submit?

I'm trying to disable button after submitting form, but i'm facing some issue, when i submit black field it validate the form and disable the button... but i want to disable it on form submit ...
1
vote
2answers
5k views

Cannot call methods on modal prior to initialization; attempted to call method 'openModal'

This error is generated when i want to show popup when page load in magento2. Here I mentioned code of popup. In popupWidth and popupHeight there are height and width value store. require(['...
0
votes
0answers
14 views

Magento 2: jQuery: User Get Blank Image In Email

I'm using Magento 2.2.1, I have an issue to fix, I'm using drawpad jQuery but I'm stuck in it, there is a frontend page like this: Here user draw line where he wants to or mark the parts, and submit ...
2
votes
2answers
53 views

What is the meaning of “*” in magento custom jQuery

I have a code of jQuery: <script type="text/x-magento-init"> { "*": { "magepowSizeGuide":{} } } </script> What can be the ...
0
votes
0answers
21 views

Error while extending jQuery widget

I'm trying to extend the widget in vendor/amasty/label/view/base/web/js/label.js and override a functionality in one of its methods. The error I get is: TypeError: base is not a constructor in ...
0
votes
0answers
332 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
659 views

How to call a js method in my template with RequireJS in Magento2?

In vendor/magento/module-catalog/view/base/web/js/price-options.js there is a method _onOptionChanged: function onOptionChanged(event). I would like to call this method in my template when page load. ...
0
votes
1answer
1k 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 ...
1
vote
2answers
96 views

How to Include a Third-Party Javascript in Magento 2 Using requirejs

I tried to include a Jquery lightbox script (Ekko Lightbox) in one of my Magento 2 CMS pages. But when I click on the trigger links to display a video, nothing seems to happen in the browser, but ...
1
vote
0answers
440 views

Configurable product price not changing. Help with Jquery conflict

I have set up my simple products for my configurable product to change the price based upon size. It is working and adds to the cart at the correct price, but the price doesn't change dynamically on ...
0
votes
0answers
22 views

How to call a function on change of window.checkoutConfig data Magento 2

So, I am using window.checkoutConfig data in my js for some calculation. the function works well when called from HTML, but it doesn't run on itself when window.checkoutConfig data is changed. HTML ...
2
votes
1answer
748 views

Magento 2 adding jquery in home page

I have added 'jquery-1.10.2.min.js' in app\code\Vendor\Module\view\frontend\web\js\default.xml file for showing a pop up on clicking Add to Wishlist button for product in home page. But on including ...
0
votes
0answers
182 views

jquery.mobile 1.4.3 Uncaught TypeError: Cannot read property 'concat' of undefined

Whenever I trying to use a greater version of jquery 1.12.4 then this issue comes. and whenever I use lower version then "post" function error so please give me a solutions.
3
votes
0answers
404 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.
0
votes
0answers
43 views

How to use FB.getLoginStatus in Magento 2.3?

I am working with implement social login(google , facebook). So here I using the function with ajax post. And added any version of jquery. So here there are many issues comes. And I am using login by ...
0
votes
0answers
209 views

How to resolve Uncaught TypeError: Cannot read property 'version' of undefined?

Here I am using below jquery include in register.phtml <script src="https://code.jquery.com/jquery-1.12.4.min.js" /></script> so that is why coming to that issue. So I need to solve it....
0
votes
1answer
92 views

Cannot read property 'click' of undefined In magento 2 phtml file

Script in filename.phtml <script> require(['jquery', 'jquery/ui'], function($){ // $('.swatch-option')[0].css('color','red'); $('.swatch-...
0
votes
0answers
10 views

Magento2 Payment js

I have created an apple pay function session.onpaymentauthorized form this function I want to get an event when I add log in function body its ok but when I log as you can see in my code here I did ...
0
votes
1answer
1k 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="...
3
votes
0answers
41 views

How to show all data in array using jquery. Magento 2

I'm getting all the Data from Array in Jquery when I console.log() it then it shows me all the data of the array but when I append the data with <div> then it only returns me the last value I ...
0
votes
0answers
12 views

Magento 2.2.5 how to validate custom field in customer registration form with jquery and modals

I've create my own module and db table to add new custom field to customer registration form. The field is "company code". When submit, it should look into company codes table, check if code already ...
0
votes
1answer
19 views

Can we Pass Jquery Value in PHP Function of Block. Magento 2

I want to pass the value of jquery in PHP function is it possible to send the value. like for example I have a textbox and in textbox when the user add 5 then it instantly send to the php function ...
1
vote
1answer
696 views

Multiple Jquery Version for extension reason

I get some issue my custom theme and it's get from one of extension jquery version. How can I fix this issue ? extension .xml file; <layout> <default> <reference name="head"> ...
0
votes
1answer
33 views

magento2 checkout summary page refresh on click redio button event

I want apply different charges with customer group on-click radio button via ajax summary part refresh in checkout page.If anyone know reply me.
1
vote
0answers
27 views

Magento 2.3.1 js error 500

In Magento 2.3.1 everything I put a product in Wishlist I get this error in console of all browsers: GET https://mystore.com/el/customer/section/load/?sections=customer%2Ccompare-products%2Clast-...
1
vote
1answer
871 views

Magento 2: Adding external CSS and JS to only one content page, and use jquery functions inside the content

I am trying to add some dynamic function to one content page of a Magento 2 site, but didn't manage to do it. Here is what I thought: 1) Adding the external javascript files at the "Layout Update XML"...
2
votes
2answers
58 views

, or ) expected in Jquery function call in magento 2

, or ) expected in Jquery function call in magento 2. I'm getting this error in custom jquery file. I'm getting this following error in internet explorer browser. SCRIPT1006: Expected ')'
1
vote
1answer
1k views

“ReferenceError: $j is not defined”

I see this error in the firebug. "ReferenceError: $j is not defined" I read that it is to do with jquery file. I have following code in my theme in local.xml file. <default> &...
-1
votes
1answer
45 views

Magento 2: How can write jquery in html file?

I try it but not working with html file <script type="text/javascript"> require(['jquery', 'jquery/ui'], function($){ jQuery(document).ready( function() { alert("Page loaded."); }); }); ...
1
vote
1answer
984 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
0answers
20 views

Keyboard navigation issue Firefox and Safari

I'm having issues with keyboard behavior in Firefox and Safari running the Luma theme. Tabbing misses the navigation and <a> tags within the <body> and moves to the browser Chrome. I tried ...
1
vote
1answer
786 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 ...