Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
5
votes
1answer
267 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 ...
0
votes
3answers
1k 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
31 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
818 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
41 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.
0
votes
0answers
150 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
318 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
1k 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
4answers
4k 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
202 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
57 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
0answers
71 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
298 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
172 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
191 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
75 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
103 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
579 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
201 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
59 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
121 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
31 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
255 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
6k 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
85 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 ...
1
vote
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
37 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
1k views

JQuery how to remove tr in table which are display none in CSS [closed]

how to remove tr in a table which is display:none in CSS
1
vote
0answers
41 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
35 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
81 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
29 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
356 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
16 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
113 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
56 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
125 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
1answer
4k views

Magento 2 properly update core jquery lib

I keep seeing this warning in my console (firefox dev-console) JQMIGRATE: jQuery.browser is deprecated jquery-migrate.js:41:4 console.trace(): jquery-migrate.js:43 migrateWarn ---.com/static/...
0
votes
0answers
144 views

Js error when first time loading site magento 2 in chrome browser

Js error when first time loading site magento 2 in chrome browser. Firefox, and explorer no problem. One of the problem is here. http://prntscr.com/kso59y
1
vote
1answer
572 views

Magento 2: Frontend file uploader (jquery)

I need my users to be able to upload some files from the backend, with the functionality of a preview image, abort button, multiple files uploadable, etc. And since Magento already uses the blueimp/...
0
votes
2answers
79 views

Jquery function call issue Magento 2

I am attempting to create a basic text slider, which works perfectly well on a plain html page. However, when I move it to my Magento 2 site, I get an undefined error for this piece of javascript. ...
5
votes
2answers
653 views

Magento 2 : How to call text/x-magento-init on Ajax success

I am in need to trigger some script with "text/x-magento-init" on ajax call but I am unable to do so. trigger('contentUpdated') contentUpdated is also not working in my case. I am using ...
2
votes
1answer
891 views

Magento 2 How to set value to UI component hidden field using Jquery or Javascript

I want to fill value in to ui component hidden field using Jquery or Javascript. Below is my code. Namespace/Modulename/view/adminhtml/ui_component/sampleimageuploader_image_form.xml <field ...