Questions tagged [jquery]

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

1
vote
0answers
136 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.
3
votes
1answer
1k 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')....
5
votes
3answers
299 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
19 views

how to add custom validation rule for form in magento 2

i have two fields in form file.phtml <div class="field"> <label class="label"><?php /* @escapeNotVerified */echo __('Current quote amount') ?>:</label> ...
1
vote
1answer
4k 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 ...
10
votes
5answers
22k views

How to add Jquery in Magento?

In my current project in about us page I need to add tabs to switch between different section I know this can be done by Jquery tabs but I don't know how to do this when integrating with magento.
4
votes
2answers
70 views

Menu that open by itself after clicking on the link of a parent category

When I click on parent category, the page load but the menu re-open if the pointer of the mouse is still present. What do you recommend so that the menu does not re-open immediately ? I found PHP of ...
2
votes
2answers
1k 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 ...
3
votes
1answer
95 views

JQMIGRATE: jQuery.fn.andSelf() replaced by jQuery.fn.addBack()

JQMIGRATE: jQuery.fn.andSelf() replaced by jQuery.fn.addBack() error when first time lode the website after refreshing all ok every thing are working its in magento 2.2.6 please not provide solution ...
2
votes
1answer
30 views

Magento 2.1.7 - Unable to send form data to controller using AJAX

I am trying to fetch input value but I am unable to get values in the controller. Here is my code, Controller\Index\Index.php <?php namespace Crud\Crudatfrontend\Controller\Index; class Index ...
2
votes
1answer
3k views

Uncaught Error: Mismatched anonymous define() module in magento 2 .?

I have use mCustomScrollbar jquery plugin but there some error have come & error like: Uncaught Error: Mismatched anonymous define() module.. Help appreciated. Thanks. My mCustomScrollbar ...
1
vote
2answers
47 views

Magento 2 Execute jQuery when minicart is done loading

I'm having the problem currently where I need to run some jQuery on my Minicart. However, I can't select anything from the Minicart because the jQuery is executing before the Minicart is actually ...
2
votes
0answers
43 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 ...
1
vote
1answer
41 views

CountDown Timer not Working

I am trying to implement this circular timer on product Detail page by following the instructions. my catalog_product_view.xml code is <?xml version="1.0"?> <page xmlns:xsi="http://www....
0
votes
0answers
40 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
1answer
31 views

How to remove default contact form validation in Magento2.2.5?

I want to remove default contact form validation and add my jquery validation in contact form in Magrnto2.2.5? Any help would be appreciated.
0
votes
1answer
23 views

3party jQuery Library is loaded before jQuery

I have a custom module that does only one thing and that is lazy loading images. For the lazy loading part, I'm using jQuery Lazy (http://jquery.eisbehr.de/lazy/) My Problem: Sometimes the jQuery ...
0
votes
0answers
55 views

Magento 2.2 - Uncaught TypeError: jQuery(…).autocomplete is not a function

Jquery UI autocomplete is not working. Refer the attachment. Please help me to sort out this.
0
votes
1answer
87 views

jQuery validation not working on pressing enter key in Magento2.2.5?

I have used jQuery validation, but it is not working on pressing enter key in Magento2.2.5? But works on Submit button. Refer my code. <script src="http://ajax.aspnetcdn.com/ajax/jquery....
2
votes
1answer
45 views

Add custom block under selected shipping methode magento 2 not working

I am creating a magento2 module and I want to add an html block to selected shipping method: I am using jQuery to achieve this but I will accept other workarounds all I want is to make this work. I ...
0
votes
1answer
40 views

How to get product configrable id in cart in magento 2 using jquery

i have a custom module for shipping methods in magento 2 i need to get config product id in the cart list using jquery Date-block.html <script type="text/javascript"> require( ['...
1
vote
1answer
922 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 ...
2
votes
0answers
165 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 ...
1
vote
2answers
674 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
64 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
1answer
30 views

Magento 1.9.2. - Validate email if already exist with ajax without custom module

Before registering I would like to validate the email field entered by the user to know if it exists in the database. This is my code: <input type="text" name="emailreg" value="" id="emailPreReg" ...
0
votes
0answers
17 views

magento2 checkout summary page refresh on click redio button event

I want apply different charges with customer group onclick redio button via ajax summary part refresh in checkout page.
1
vote
2answers
878 views

Magento 2 FancyBox Implementation for youtube videos

Am implementing fancybox in magento 2, which has been implemented in magento 1 but in M2.2x shows a require js implementation and I have done that so but still the issue persist. NOTE : The issue ...
2
votes
1answer
146 views

getDescription in the slide down panel

I am trying to display the description for each product in the slide down panel. I am using a slider to display product images where I have a on hover buttons first one adds the product to basket and ...
0
votes
2answers
15k views

Magento 1.9 : TypeError: jQuery(…).owlCarousel is not a function

I get a problem with the owl-Carousel. I have tried many different answers from the same question however nothing helps. So I will show you all my code and hope someone knows the answer.The problem ...
1
vote
1answer
24 views

Magento theme displays errors and responsive display after refresh

We have a Magento webshop (1.9.3.2) with Ultimo theme, which appears to have some strange problem in a few browsers - we've discovered it's only on Chrome and Opera so far. When you first watch the ...
0
votes
1answer
632 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. ...
1
vote
0answers
693 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-...
0
votes
1answer
832 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
1answer
215 views

Use slide animation for opening tabs or accordions

I'm trying to update the product tabs/accordions to animate when I select them. I've removed the tab styling and adjusted them so they are accordions that open up and down on the page. I'd like to ...
3
votes
1answer
814 views

Magento 2.2.2 bootstrap.min.js:7 Uncaught TypeError: f[b] is not a function

I am Using Magento 2.2.2. I have inserted this code in the Block i.e Content>Block when wei click on the Ask an Expert image , The Modal popup should appear. But currently its not showing popup, the ...
1
vote
1answer
69 views

Uncaught Error: Mismatched anonymous define() magento 2.2.4

Below is the console erros is getting in frontend. Checked .htaccess in pub, pub/static and root all .htaccess are identical to Magento 2.2.4 version. js bundling/minification is enabled and ran ...
4
votes
0answers
42 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 ...
0
votes
1answer
809 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="...
2
votes
1answer
703 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
2answers
319 views

Magento 2 layered navigation Ajax jquery problem

I am having this problem from Magento 2.2.5 and when upgraded to Magento 2.3 also. I use custom template Layered navigation with Ajax isn't working. I use Amasty one It just refreshes the page and ...
1
vote
0answers
115 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
210 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 ...
0
votes
0answers
134 views

Product detail page image not loading on front end

Product detail page images are not loading. Pointer is just spinning. I have read lots of threads. Clear cache, reindexed, change permissions. Finally i got the problem. but unable to fix it. :-/ I ...
1
vote
1answer
21 views

Custom Page in Magento2

I am new to Magento 2. We are currently in the process of migrating from Magento 1 and I have been tasked with updating our custom pages to work in Magento 2. I have a page (using the page editor in ...
1
vote
0answers
22 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
2answers
49 views

Inline call of jQuery tabs doesn't work

Here's my problem. I have a tabs block which load perfectly when I put this script in phtml require([ 'jquery', 'jquery/ui' ], function($) { $("...
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
vote
1answer
829 views

How to add a JQuery library in Magento 1.9

I was needing to add a Jquery library in magento 1.9, to use on one of my phtml pages, to insert masks in my fields, like cpf, cnpj and etc ... I have done a lot of research and I have noticed that ...
1
vote
1answer
797 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"...