Questions tagged [jquery]
Denotes questions related to the use of jQuery library in Magento.
795
questions
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 ...
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 ...
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 ...
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',
...
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!
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 ...
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:
<...
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({
...
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/...
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 ...
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 ...
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 !!!
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 () {
$('....
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 ...
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) ...
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 ...
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 ...
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 ...
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 ...
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="...
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 ...
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 ...
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({
/** @...
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="{"action":&...
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.
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.
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 ...
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[...
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:'...
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 ...
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?
-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)
...
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 ...
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 "&...
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 ...
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 ...
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 ...
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="<?= $...
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(...
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 ...
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/...
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 ...
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 ...
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 ...
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);
...
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 ...
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>
...
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 ...
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="#"&...
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
...