Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Open main menu on click and subcategories on hover

After magento upgrading to 2.4.5-p3 this doesn't work anymore. I want customers to be able to open the main menu on click and then continue to navigate the subcategories (and sub-sub categories) via ...
mullayo's user avatar
  • 23
0 votes
1 answer
43 views

How to add my custom jQuery in admin uiComponent form

Is there any way that I can add a JS/Jquery file which may able to listen my uicomponent's (checkbox/Radio) event (like OnClick or OnChange) so that I can do some operation with that. That UiComponent ...
Shahzad Hasan's user avatar
1 vote
0 answers
33 views

Add Custom Field to Braintree Credit Card Payment Method in Magento 2.4

I want to add the custom field i.e. po_number in the braintree credit card method in the payment page. Here is the code which I have added for field. <?xml version="1.0"?> <page ...
Mitul Vadalia's user avatar
0 votes
0 answers
27 views

JavaScript not executed when it has Magento_Customer/js/customer-data dependencia in define

I have a JS file like this: define([ 'jquery', 'underscore', 'matchMedia', 'text!ajaxcart/template/modal-slide.html', 'text!ajaxcart/template/modal-popup.html', ...
Eliacim DAVILA - CENSERE's user avatar
0 votes
1 answer
74 views

Magento 2 / How to change to Camel Case an input in checkout form in real time?

I need to change to Camel Case the customer input name in checkout form in real time. Have Magento any method for this in Layout Processor or using JQuery? From: To: Thanks!
Diego Castro's user avatar
0 votes
1 answer
115 views

Magento 2.4.4: Attach event handler to Province dropdown to reload the checkout page

We developed a custom shipping module that displays shipping methods and the rates in Firecheckout page. The issue is the Shipping Method block in the firecheckout page doesn't refresh if one changes ...
CodeForGood's user avatar
0 votes
1 answer
69 views

Adding Constant Contact Inline Signup Javascript to Magento

I am trying to get the Constant Contact Inline Signup form and AlphaSSL Security banner working in my site footer. I copied the relevant code from the websites into a block in admin called footer: <...
MightyFeldar's user avatar
0 votes
0 answers
30 views

how to use selectize on input field?

I want to apply selectize on input field to convert comma separated string into tags. What I have done so far. jQuery(document).on('input[name="product[bundling]"]').selectize({ ...
Asad Ali's user avatar
0 votes
1 answer
460 views

How to add Custom JS in admin side?

I want to add custom JS on product edit page in admin side. After doing some R&D, i found a solution but that didn't work. What I have done so far, app/code/Vendor/Module/view/adminhtml/layout/...
Asad Ali's user avatar
0 votes
0 answers
78 views

Shipping Methods Jquery Code

I'm doing some customization on Magento 2.4.4 checkout and i need help to understand how to inject some javascript into "table-checkout-shipping-method" I tried do innsert following code in ...
user3718303's user avatar
4 votes
1 answer
3k views

Uncaught TypeError: url.indexOf is not a function

After Magento Upgrade in latest version product list page showing this error, please suggest me what we can take step to solve this error. jquery.js:10363 Uncaught TypeError: url.indexOf is not a ...
Aashutosh Kumar's user avatar
1 vote
2 answers
192 views

Add Success Message in Custom Popup for Add to Compare in the listing or Category Page in Magento 2

I want to add custom pop-up in category page for showing success or error message for add to compare button. Any help is appreciated. Thanks in Advance !!!
Mitul Vadalia's user avatar
0 votes
2 answers
283 views

Switch between accordion behavior on resize not working properly

I am trying to get a different behaviour of the product tabs/accordion on desktop vs. mobile. I use the matchMedia function to do so. So in the desktop part I use: entry: function () { $('....
Mario's user avatar
  • 433
0 votes
1 answer
644 views

Magento 2 : can I upgrade jQuery versions?

I opened the developer console and executed jQuery.fn.jquery and I get 1.12.4. Why does Magento 2 uses the old version even though the latest version is 3.6.0? I am running a pagespeed report on ...
Sejal Shah's user avatar
  • 2,101
0 votes
1 answer
85 views

Move Welcome Greet Message to header panel

I am using smarthwave porto theme, in which I need to move the Default Welcome Message from Nav Menu (shown in screenshot 1) to main header panel (which is in blue color at top)(shown in screenshot 2) ...
Mitul Vadalia's user avatar
0 votes
0 answers
79 views

how to pass javascript variable to php in template

I am creating admin form using template I have multiple select dropdown. I want to filter dropdown based on the value of other but problem is how i can assign the javascript value to php variable so ...
Syed Hassan Zamir's user avatar
0 votes
1 answer
52 views

How do I select multiple Tax Rates - BY TEXT SEARCH in Magento 2?

I am struggling with selecting Tax Rates in Magento 2.4.4. There was a fantastic answer to this issue: How to select multiple tax-rate In Magento 2? Where the Console code lets us select ALL tax rates ...
Brianna's user avatar
0 votes
1 answer
865 views

Magento2.4.5 google brower console display jquery-migrate.js:100 JQMIGRATE: jQuery.fn.bind() is deprecated

Magento CE 2.4.5 I install some theme after google brower console display follow info ,how to fix? JQMIGRATE: jQuery.fn.click() event shorthand is deprecated JQMIGRATE: jQuery.fn.resize() event ...
sq y's user avatar
  • 95
1 vote
0 answers
74 views

Disable Payment Method By JS

I have a requirement to disable the payment method based on a custom product attribute in the cart and payments page, whose value is stored in the cookie local. Till Now I have been able to get a ...
Mitul Vadalia's user avatar
2 votes
2 answers
5k views

Uncaught Error: Mismatched anonymous define() module

I'm trying to use jquery in an adminhtml js file...but it seems not to be working and can't get to understand why...any help would be appreciated ! Layout is like <head> <script src="...
Claims's user avatar
  • 944
0 votes
1 answer
422 views

How to remove disable attribute from a button in form-mini

I'm trying to remove disable from a button in form-mini.phtml but couldn't find a way through jquery/javascript. I know it gets enabled after adding a few characters, but by default, it remains ...
Sara Whitmore's user avatar
0 votes
0 answers
250 views

How we get an element from second tab of ui component on edit magento 2.4

I have an Admin UI form with two tabs. There is a dropdown field on first tab .Based on this dropdown value I want to show or hide an another field which appeared on the second tab. But we could not ...
Anjaly Suresh's user avatar
1 vote
0 answers
58 views

Wishlist item Always Return 3 items

define([ 'jquery', 'uiComponent', 'Magento_Customer/js/customer-data', 'domReady' ], function ($, Component, customerData) { 'use strict'; return Component.extend({ /** @...
imtraf's user avatar
  • 11
0 votes
1 answer
130 views

i want to get data from attribute data-post

<a href="#" class="action towishlist btn-round pink" title="Add to Wish List" aria-label="Add to Wish List" data-post="{&quot;action&quot;:&...
imt's user avatar
  • 101
1 vote
1 answer
150 views

Get System Config Values in JS file without use of phtml

I want to get System Config Value in my JS file directly without using phtml template. thanks in advance.
Muhammad Ali's user avatar
0 votes
1 answer
1k views

How to Create a Dynamic Owl Carousel

Using code below you can create a fully responsive dynamic owl carousel. The same way you can implement this carousel in magento2 as well.
Syed Hassan Zamir's user avatar
0 votes
2 answers
547 views

Magento2 Jquery Post Form via Ajax

I have a basic html form and what I want is when clicking the submit button to use Jquery and Ajax to post the contents to an external url instead of reloading the entire page. However whats happening ...
Jayreis's user avatar
  • 685
0 votes
1 answer
73 views

Custom js Script not working . when magento upgraded 2.3.3 into 2.4

category-map.js define( [ 'underscore', 'jquery', 'mage/template', "prototype", "mage/adminhtml/form" ], function (_,JQuery) { // <![CDATA[...
R J's user avatar
  • 5
0 votes
1 answer
308 views

Magento2 - How to pass query parameter in curl get method

I have a curl request example, it is working once I'm checking it with command line. curl https://api.stripe.com/v1/payment_intents/search -u secret key: --data-urlencode query="status:'...
Suresh Chikani's user avatar
0 votes
0 answers
102 views

Jquery code doesn't work when deployed but runs fine in the browser console in Magento cart page

We're trying to just display the text in the code below if the page is the cart page so that visitors are aware that they can add a gift message to their order. Code works fine by displaying the text ...
CodeForGood's user avatar
0 votes
1 answer
61 views

how to get the return of an ajax request that I didn't send

there is a request that is being made on the site, but I didn't make this request, but I need to get the result of it. Is there anything I can do?
lucas's user avatar
  • 307
-2 votes
1 answer
364 views

How to solve this error ? menuAim is not a function

Error: at HTMLDocument.<anonymous> (mega-menu.js:41:28) at fire (jquery.js:3238:32) at Object.fireWith [as resolveWith] (jquery.js:3368:8) at Function.ready (jquery.js:3588:14) ...
Parth Patel's user avatar
0 votes
1 answer
2k views

How to stop Playing video in the background when popup modal is closed or click on out side of the popup

I have a button. When user click on button i am showing the video in popup modal. But when i click on outside of the popup the popup is closing but video is keep playing and when i close the popup ...
Mani's user avatar
  • 173
0 votes
1 answer
42 views

Owl Carsouel in Magento2

I am creating owl carsouel for compare products <div class="main-padding"> <div class="message-container"> </div> <div class="compare-inner-block "&...
Syed Hassan Zamir's user avatar
0 votes
0 answers
247 views

Button click event

I am looking for a jquery script that will run whenever any button is clicked. The button can be any. Once the script is completed then the button will continue to work as normal. I just want a Jquery ...
nazmul mondal's user avatar
4 votes
6 answers
2k views

jquery.mobile.custom js file error after upgrade to Magento 2.4.4

I just upgraded my magento version 2.4.3-p1 to 2.4.4, and i noticed in console.log there is an error stating: i tried to access the js file using the js file link, but here's what i got after ...
blue's user avatar
  • 118
0 votes
0 answers
42 views

How to show thanku popup only, if user alredy submitted the form in magento 2 untill user leaves page

I have custom popup form, when the user click on 'get in touch' button i am showing popup to fill the form, once user submitted the form i am showing thanku popup.So if the user again click on 'get in ...
Mani's user avatar
  • 173
1 vote
2 answers
2k views

Form validation is not working in my custom form in Magento 2

<div id="popup-modal"> <div class="contact-form-popup" style="display:none;"> <form class="form contact" action="<?= $...
Mani's user avatar
  • 173
0 votes
0 answers
1k views

How to show success message in popup modal after submitting the form in magento 2

here i did this to show popup modal <div id="popup-modal" style="display:none;"> <form class="form contact" action="<?= $block->getUrl(...
Mani's user avatar
  • 173
0 votes
1 answer
290 views

How can i move Strategery InfiniteScroll "Load More" button?

I installed Strategery InfiniteScroll to my Magento 2 project. The plugin provides an option to display a "load more" btn at the bottom of the listing page. However there's a problem. The ...
Annak942's user avatar
0 votes
0 answers
666 views

Get Mini Cart Update Cart Button Event

I want to obtain the event during which this Mini cart update cart button is clicked I want to observe when and how many the amount of it being clicked I try to put below code inside app/design/...
Mohd Farhan Bin Ramli's user avatar
0 votes
2 answers
50 views

Custom Javascript not loded properly in magento2

Custom Javascript is not working with infinite scroll or after applying some filters from shopping options Working Fine with the first 12 products. but after applying some filters or working with the ...
Syed Hassan Zamir's user avatar
0 votes
1 answer
385 views

jQuery listen to ko data bound input

I have a component with for a "quantity changer", comprising of an input field and plus/minus buttons. The input and buttons are connected via data-binding on a KO observable. This works as ...
king_nak's user avatar
  • 131
0 votes
1 answer
402 views

Magento 2: Create Dynamic Category Dropdowns on Frontend

I, once again, have to ask for your help. I need to create a modal that let the customer select their car brand, model and year, and I need to populate the select options depending on the selections ...
Alberto Privado's user avatar
0 votes
1 answer
176 views

Magento 2.4.0 external JS not loading

one external js library has this kind of code and full library of code at bottom !(function (o, e, t, _) { ........... ....... .......... })(jQuery, window, document); ...
Niraj Patel's user avatar
0 votes
1 answer
136 views

Sticky Navbar Magento2

I want to make the navigation bar to be sticky. I have completed that in the below way. Now I want to make the logo to display in the navbar when we scroll. I don't know how to add the logo to the ...
Sweety's user avatar
  • 1
0 votes
1 answer
646 views

Jquery on click event

Can anyone give example for both click and on click event in jquery? I tried this example for on click, but the same function is happening for a click event also, <!DOCTYPE html> <html> ...
Sweety's user avatar
  • 1
1 vote
2 answers
222 views

Ajax api call doesn't works using onclick returns error 400

So I'm trying to do an API call using Ajax on the Admin page, when I add this API call in onclick attribute, it doesn't work it returns error 400 Bad request, BUT when the API call isn't vinculated at ...
Rafael Fagundes's user avatar
1 vote
1 answer
555 views

prevent scroll top from confirm jquery / prevent scroll top from remove product from mini cart in magento 2

In Magento 2, I've seen that when we click on the button remove a product from the mini cart, we will be scrolled to the top of the site. I've see that this one is because of <a href="#"&...
fudu's user avatar
  • 1,258
0 votes
3 answers
580 views

Magneto 2 : how to call code in require js

How to write code in require js, I created layout default.xml file and added code like this <link src="Test::js/custom.js"/> And I created web/js/custom.js and wrote like this ...
User0434's user avatar
  • 1,123

1
2 3 4 5
16