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
42 views

Magento 2.2.3 How to change validation message Or add new custom rule in system config field

I want to change default validation message in system config field. Below is my system.xml code. <field id="maxlabel" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="13" translate="...
1
vote
1answer
840 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/...
5
votes
1answer
193 views

Megamenu issue - Clicking menu opens category page for that menu in mobile in Magento2

I need to resolve issue of responsive megamenu for mobile. The issue is when I click on the subcategory to opens its child sub-categories the link gets clicked and gets redirected because of which ...
1
vote
1answer
734 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 ...
0
votes
3answers
812 views

Javascript function in phtml files

I am using onclick function in my template file, here is my html <div class="input-box"> <input type="checkbox" name="change_password" id="change_password" value="1" onclick="...
1
vote
1answer
28 views

Magento 1.9 - Add custom zipcode validation on Home page

Validate a zip code field on a home page popup in Magento 1.9 style might be using jquery button click.
5
votes
2answers
716 views

How to trigger self.openFullScreen() function into my custom jQuery in Product details page

If we click on product image in the product details page, gallery full screen is coming to see the images in full screen. I am trying to get the same functionality when click on my string Quick view ...
0
votes
0answers
33 views

Magento 2 : Access the DOM from custom module?

I want to have some jQuery within my custom module to detect whenever a navbar item is clicked on the website. Is there any way of detecting jQuery events? Any help appreciated.
3
votes
0answers
212 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
128 views

Magento 2 : admin form image file validation not working in server

In my form i am using this code to upload the file. $fieldset->addField( 'banner_image', 'image', [ 'name' => 'banner_image', 'label' => __('...
0
votes
1answer
191 views

Magento 2 read more and read less in description product page

I want to add a read more and read less button in the description on the product page. I do not want to cut the entire text and onclick of the read more show another div with the entire content. I ...
2
votes
1answer
960 views

Magento 2 jquery menu/nav widgets

I'm trying to utilize the menu or nav jQuery widget that comes with Magento 2 based on what I'm trying to accomplish. A secondary navigation section that will live on a sidebar element. It's just a ...
3
votes
5answers
3k 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
2answers
158 views

Magento 1.9 - How to get price format in javascript or jquery?

I am trying to get magento price format in php file using jquery / javascript function but facing problem. What I have tried .... <script> var price = 10; var priceFormat = '<?php echo Mage:...
0
votes
1answer
40 views

js merge carousels sliders are breaking when js merge

After js merge carousels sliders are breaking in the site, followed no-conflict and other solutions, also in the console this is showing Uncaught TypeError: jQueryowlCarousel is not a function ...
2
votes
1answer
68 views

Custom popup in magento2

I have created a custom popup in list page .. I need to open the popup after 4 sec of every product addtocart. And auto close the popup after 4 sec. some time the popup suddenly closed within 4 sec.....
0
votes
1answer
182 views

Controller redirect on jquery post request from phtml template

I want to redirect user on button click from .phtml template file, however, really struggle to find a working solution. Here is my controller with path of /batchorder/index/addtocart: public ...
1
vote
0answers
121 views

I am getting jquery error while adding custom field in payment method in magento 2?

I am trying to add custom fields in magento 2 but it is not working. I am getting JQMIGRATE: jQuery.browser is deprecated jquery-migrate.js:41:4 console.trace() jquery-migrate.js:43:5 ...
0
votes
1answer
153 views

Can not Place Order, Is it Migrate JS Error at Magento 2.2.7 Error?

I have installed Magento ver. 2.2.7 for A MarketPlace Site also Purchased MarketPlace Extension and Installed it Successfully. Before Order Place was working, But Now click on Order Place Button, The ...
1
vote
1answer
64 views

Clear GRID Serializer Values in hidden field

I have a working Grid Serializer. Now I want to clear the Grid Serializer values without refreshing page. So, I added a jquery script to clear the hidden field: $("input[name='links[products]']")....
0
votes
2answers
3k views

Magento 2 & JQuery.UI.Autocomplete

I would like to use JQuery.UI.Autocomplete component in my module for Magento 2. Also, I am using KO.js for the user interface of my application. So, I have added a custom binding for KO: define([ '...
0
votes
1answer
83 views

Use of non-amd jquery plugins with requirejs without modifying them?

I recently searched a lot on use of non-amd jquery code with requirejs but couldn't find a proper way to do it. To be more specific, I want to use pana-accordion.js found at below mentioned url. ...
0
votes
3answers
334 views

Magento 2 How can I hide the price and total from cart and checkout summary?

I want to hide price and totals from cart/checkout Summary. You can see in below image. How can I achieve this functionality with a custom module? Is there any common file from I can hide the price? ...
1
vote
1answer
168 views

Magento 2: Browser console error on hard refresh

I am facing some weird issue with Magento 2.2.5 version. When I first-time open website, I am getting lots of js errors. (Screenshot attached) After this, when I only press F5 button (normal refresh) ...
0
votes
0answers
12 views

Project results change event in JS

In Javascript or Jquery is there an event that can be watched to see if the product results set has been changed or filtered because sometimes the window does not reload and my plugin login does not ...
0
votes
2answers
58 views

How to empty the form before loading in magento 2

I have created popup modal using ajax and it works successfully. But once the form submitted, it saves in DB. But if I click again to perform action, It simply shows prefilled message instead of new ...
2
votes
1answer
92 views

jquery plugin error “Uncaught TypeError: $(…).[plugin function] is not a function”

I am using Magento 2.2.6 and I am trying to include a jquery plugin (stickybits, in this case). The jquery plugin file is successfully called in my requirejs-config.js file and I can see that the file ...
0
votes
0answers
20 views

Integrating Magicsearch(autosearch) plugin into Magento 2 but getting Magicsearch JS error in console

I'm integrating "jQuery Magicsearch" plugin into Magento 2,you can get Magicsearch plugin from here:- https://www.jqueryscript.net/form/Dynamic-Autocomplete-Multi-select-Plugin-With-jQuery-...
2
votes
1answer
238 views

Fresh Magento 2.3 Resource Files Not Working After Installed in Windows

Fresh Magento 2.3 installed in windows, after resource check and completed everything successfully installed, then if i open my website i am getting error like,
0
votes
0answers
23 views

How can I increase the speed of my Magento website?

I have a system in magento ready and running, but the speed of the web is not very good. Here you can see a sample of how the web works: https://developers.google.com/speed/pagespeed/insights/?url=...
0
votes
2answers
5k views

Magento 2 Simple jQuery Example

I was wondering if anyone could provide a simple jQuerying hello world example in Magento 2. I have read the documentation on requireJS and the Magento 2 documentation and I am still struggling. ...
0
votes
0answers
65 views

Issue when Full page cache enable in magento2

I have found issue related to full page cache enable. I am not able to remove the label on document ready in magento2 <script type="text/javascript"> require(['jquery'], function ($) {...
0
votes
1answer
45 views

Refresh time stamp on product view (Magento)

I need to reload the data within a DIV, I am using a time stamp for testing purposes. The code I have appears to work outside of Magento So I cannot see why it is not working on my Magento Site. I ...
0
votes
2answers
2k views

Magento 2 : Add to cart button change to go to cart after adding product

How to do the following - Clicking on "Add to Cart" button adds the product to cart then Button Changes to "Go to Cart" and clicking on that redirect to Shopping Cart Please help me in doing this ...
0
votes
0answers
36 views

problem with using jquery

I am new to magento and know only basic thing about it. I want to show a popup on my page. I just add alert after document.redy event on that .phtml file but the popup wont appear after loading that ...
1
vote
1answer
851 views
0
votes
1answer
424 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
0answers
36 views

New security threat to Magento caused by it using jQuery-File-Upload?

Magento 2 uses the Blueimp jQuery File Upload Plugin v5.16.4 which has recently been identified at posing a security risk to web applications which use it. Is this an issue for Magento and should ...
0
votes
1answer
24 views

The number of “Requests” is very large

I tested my website performance with Gtmetrix. I found that my website performance seems to be good, but the number of “Requests” is very large. I want to know if the impact of this problem is big? If ...
0
votes
2answers
30 views

How to add class if a product have Customizable Options in Product Details Page in magento 2

I have two types of products in my site Type 1 :products with Customizable Options Type 2 :products without Customizable Options I wish to add one custom class(for css purpose) to the products which ...
0
votes
1answer
47 views

How to add custom js file for PDP page in magento 2

I wish to include custom js file in PDP page in magento 2. I wish to do some action while product has some options. Please provide me a solution to add custom js in PDP page
0
votes
0answers
24 views

Magento 2: I found my site's checkout page loading become more slowly?

Previously my Magento 2.2.1 website used nexcess service ($19.95/1 month), when my website's /checkout page loaded quickly. I recently switched to the A2 host server ($32.99/1 month), but I found ...
1
vote
1answer
281 views

Magento 2: AJAX POST to AdminHTML

I have an AJAX POST setup within my template file currently that has 3 values, which I want to POST to my Index.php within my Block. However, my module is an AdminHTML module and this cannot be ...
0
votes
0answers
11 views

Magento 2 opens the product page sometimes reminds error?

Magento 2 opens the product page and sometimes prompts [Identifier "" not exist.] This error sometimes does not prompt. Is this what is the reason?
0
votes
1answer
72 views

SetTimeOut not working

I need to remove message after 2 sec but its not working $.ajax({ 'method': 'post', 'url': $form.attr('action'), 'dataType': '...
0
votes
2answers
46 views

Insert before in jquery [closed]

I have create a ajax call for form submit. But it returns error .......h.insertBefore is not a function define( [ 'jquery', 'uiComponent', 'mage/validation'], ...
0
votes
0answers
109 views

Magento 2| How to add “Add to cart” Button functionality in jQuery?

I am adding "Add to cart" button functionality in jQuery function for calculated product quantity. I have add simple button yet. I have doing it as: My function is: $(document).ready(function(){ ...
3
votes
1answer
2k views

Refresh and update mini cart in Magento 1.9

I have a javascript function to add the product to the cart, but the problem is I need to refresh the page to see if the mini cart updated, in Magento 2 I use this function to update this mini cart, ...
0
votes
2answers
2k 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
4answers
2k views

How to disable JQMigrate Logging

We keep receiving this log and stack trace from JQMigrate, but it seems to just be a warning. Is there a way to just straight up disable logging in production?