Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jquery]

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

0
votes
0answers
8 views

Magento2 require tage breaks list.phtml page

I am trying to get jquery to work in the list.phtml file . I have jquery working on the product detail page within a this same jquery require tag. However when I put it on the list.phtml file it makes ...
2
votes
1answer
1k 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 ...
1
vote
1answer
1k views

Knockout JS removes jQuery change event

I don't know if it is specific to Magento 2 but an already set up HTML node with jQuery change event attached to it will lose its change event when run inside a knockout component with attached VM (...
0
votes
1answer
1k views

Slick JS dose not work on magento 2 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", ...
0
votes
1answer
18 views

Apply a jQuery whitespace trim to an adminhtml filter input

My goal is to load a simple jQuery function to trim any whitespace in an admin backend filter input. The use case involves a scanner inputting codes with spaces that will turn up no results. I have ...
4
votes
1answer
1k 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 ...
2
votes
2answers
33 views

Juery Ui & Autocomplete error

Uncaught TypeError: Cannot read property 'element' of undefined I am getting this error when I load the page. This is the script i have written var stateArr = <?php echo json_encode($...
0
votes
1answer
13 views

How can active accordion tab on click

I want to active an accordion tab on button click with activate() method https://devdocs.magento.com/guides/v2.1/javascript-dev-guide/widgets/widget_tabs.html#fedg_tabs_methods-activate This is my ...
0
votes
1answer
21 views

Magento 2 - Do not scroll to invalid field on form validation

On the log in page, when I don't input input in fields, the error message displays focusing on the invalid input. The window scrolls upto the invalid field at the same time. I do not want the window ...
0
votes
1answer
598 views

How can initialize a function mobile only?

CODE HTML: <div id="element"> <div class="col-md-3"> <div data-role="collapsible"> <div data-role="trigger"> <span>Title 1</span> ...
0
votes
1answer
1k 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
1k 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 ...
1
vote
4answers
1k 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
4answers
52 views

ReferenceError: jQuery is not defined error owl Carousel slider

I am trying to use slider in my magneto custom module I did Following steps: 1 create a file requirejs-config.js var config = { map: { '*': { my: 'Vendor_Module/js/owl....
1
vote
1answer
28 views

TypeError: t.validator.methods[a] is undefined issue in jquery validation in magento2

I am facing this issue TypeError: t.validator.methods[a] is undefined after adding jquery validation in my form. Here is my validation code: <script src="http://ajax.aspnetcdn.com/ajax/jquery....
2
votes
3answers
4k views

Magento 2.1 Uncaught TypeError: Cannot read property 'replace' of null

Hi whenever I try to create a new product I get the following error in the console: Uncaught TypeError: Cannot read property 'replace' of null This is the only time I get this, I can create pages, ...
1
vote
1answer
867 views

How to remove jQuery conflict in magento 2

I am getting a conflict of jQuery and due to this some feature of Magento 2 not working . How can I resolve this issue ?
0
votes
1answer
21 views

how i can get the row values by clicking button in that table using jquery magento 2

<td data-th="<?php /* @escapeNotVerified */echo __("Quote Id")?>" class="col quoteid"> <span class="label"><?php /* @escapeNotVerified */...
1
vote
1answer
30 views

how to use post method to contoller and phtml for button event in magento 2

I have a button in phtml file some.phtml <button class="example-button-1 example-button-3 :active" type="button" id="acceptnow" ><span>Active</span></button> I want to ...
0
votes
1answer
44 views

Magento 2 - 2.3.1. Warning “JQMIGRATE: Migrate is installed with logging active, version 1.4.1”

We are seeing this Magento 2 - 2.3.1. Warning "JQMIGRATE: Migrate is installed with logging active, version 1.4.1" on fresh 2.3.1 install JQMIGRATE: Migrate is installed with logging active, version ...
0
votes
1answer
24 views

How to remove default validation from login and registration form in magento2.2.5?

I want to remove default validation from login and registration form and add my custom validation in magento2.2.5?
2
votes
2answers
42 views

How to add custom field in registration form and add jquery validation in Magento2.2.5?

How to add custom field in registration form and save in database and add jquery validation in Magento2.2.5? Any help would be appreciated
1
vote
0answers
53 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.
4
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
257 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
60 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
59 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
26 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
44 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
38 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
37 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
28 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
20 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
18 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
46 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
58 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
40 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
36 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
898 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
159 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
627 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> ...
1
vote
1answer
45 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
27 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
16 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
829 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 ...