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.

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 ...
0
votes
0answers
22 views

Owl Carousel 2 - text not responsive but images are [on hold]

My Owl Carousel is not responsive for the text position in mobile devices, this is the code I am using, works fine until I resize down from my widescreen desktop: <div id="banner-slider-demo-1" ...
1
vote
1answer
887 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 ...
0
votes
1answer
851 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 ?
1
vote
1answer
32 views

how to get value of selected option using jquery

I need to get selected value from select field using jquery in magento <field name="slider_location"> <argument name="data" xsi:type="array"> <item name="...
0
votes
1answer
20 views

Magento 2 : How to focus google map on Tokyo and Yokohama by default

I want focus google map on Tokyo and Yokohama by default. My map like this I want my map like this by default Please help me ! Thanks all
0
votes
1answer
799 views

Linking on button and open custom tab

Need to open custom tab on product view, from link. Magento 1.9.2.4 Custom theme. My tab, which is added just in one category by Custom Design <reference name="product.info.tabs"> <...
0
votes
2answers
28 views

Magento 2.3 Jquery conflict [duplicate]

I am not very familiar with JQuery but am attempting to run this piece of code in html that requires JQuery. <div> <h4><a class="collapsed" role="button" data-toggle="collapse" data-...
0
votes
1answer
122 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
1k 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
25 views

Magento 2: jQuery update to 3.x causing issues with RequireJS

I've just updated my jQuery version in Magento to 3.1.4, now all of a sudden in my console it's showing this error. I know the mobile isn't compatible yet though the Require.js errors were never there,...
3
votes
1answer
1k 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'], ...
3
votes
0answers
64 views

Is it safe to disable JQMIGRATE?

Seems like it is complaining about using a deprecated pseudo-event. Also, If I remember correctly console.trace is used for debugging and should not be shown/needed on live site. The JQMIGATE code ...
2
votes
0answers
19 views

Magento 1.x - Ajax auto choose product

I want after I have pasted sku or name product into the input seach, it will automatically check and notify. I am currently using autoComplete jQuery. But the problem is that if it doesn't show drop ...
2
votes
1answer
17 views

make sticky header without custom js code

I tried to make the header sticky using the default jquery code: $('.page-header').mage('sticky', { container: '.page-wrapper' }); I added this piece of code into the theme.js file in the ...
1
vote
0answers
14 views

How To change Position Of category Using Query in magento2? [closed]

How To change Position Of category Using Query in magento2 ? ->Magento@ admin Side Default category Position change Drag and Drop Through. But but i have to use it code for the changing postion of ...
0
votes
2answers
3k views

Magento 1.9.2.4 : Owl carousel not working

I want to add an owl carousel to my homepage (as a banner slider and product slider) I have linked every file everything is working fine except owl carousel even I have tried to use a slick slider ...
1
vote
1answer
565 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
9 views

Magento2 jQuery.live is not a function on checkout page

When i am going to place an order on checkout page then on page load i am getting an error in firebug like jQuery.live is not a function on checkout page but not display always it shows sometime. ...
2
votes
0answers
15 views

Customize native loader

I would like to challenge the template structure of Magento 2 loader which is declared in the lib/web/mage/loader.js but I can't find where this widget is calling by Magento to override the javascript ...
1
vote
1answer
979 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
1answer
30 views

Why are we sending the POST data as JSON in jQuery

I need to send data into controller. So I have to use ajax call to send it. $.ajax({ url: self.options.link, data: {product_id: product, form_key: formKey, email: emailId, mobile: mobNo}...
0
votes
1answer
1k 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
21 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
2answers
3k views

How to change jQuery version in Magento2

Magento 2.1.2 bundled with jQuery 1.11. How it possible to replace it with jQuery 2.1?
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
23 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 ...
2
votes
2answers
35 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
19 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
77 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
622 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
78 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
38 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
897 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
23 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
32 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
25 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
69 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
117 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
292 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.