Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 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 "&...
user avatar
0 votes
0 answers
15 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 ...
user avatar
0 votes
0 answers
8 views

How to stop the background from moving top of the page when popup model opens in Magento 2

I created a Popup modal. when user click on button i showing the popup form. But the Background is moving top of the page when the popup modal is opened. How to stop the background from moving top ...
user avatar
  • 29
1 vote
2 answers
82 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 ...
user avatar
  • 64
0 votes
0 answers
34 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 ...
user avatar
  • 29
0 votes
0 answers
33 views

Magento2.4.4 I am getting following errors

Magento2.4.4 getting following errors. Can someone please guide me, how to solve this errors Error 1 Uncaught TypeError: $(...).slider is not a function Error 2 Error: Call to a member function ...
user avatar
  • 3,426
1 vote
2 answers
42 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="<?= $...
user avatar
  • 29
0 votes
0 answers
22 views

How to show thanku message only after user submit the popup form in magento 2 until refresh the page

I have contact us buttons more than one in a page. when the user click on the contact us button i am showing the popup form. After user submitting the form i am showing thanku div.But when the user ...
user avatar
  • 29
0 votes
0 answers
26 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(...
user avatar
  • 29
0 votes
0 answers
12 views

Add Progress Bar at admin side Magento 2

I am adding HTML via the backend. I want to show a progress bar when users visit on particular PDP. Check the attached screenshot. I want the values to be increased when user visit on PDP Does anyone ...
user avatar
0 votes
0 answers
10 views

How to use twentytwenty plugin in Magento 2

I want to add twenty-twenty JS on the product Page on a particular image. How that can be achieved? I am trying to do so in multiple ways but it's not working. Please guide. Thanks, Rashi
user avatar
0 votes
0 answers
15 views

Swissup Slick slider is not working in Magento 2

In my magento website I am using Swissup slick slider. But its not autoplay infinite loop. Below is the widget I am using for the slider. <div class="testimonial-wrap"> <h3 class=&...
user avatar
  • 1
0 votes
1 answer
24 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 ...
user avatar
0 votes
0 answers
44 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/...
user avatar
0 votes
2 answers
48 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 ...
user avatar
0 votes
1 answer
32 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 ...
user avatar
  • 121
0 votes
0 answers
39 views

Show total price in product custom-options with jQuery not return total

I want to show total price in product custom-options. So I follow this instruction: https://magento.stackexchange.com/a/305552/103439 But it does not return total price. I tried a lot of variations, ...
user avatar
0 votes
1 answer
21 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 ...
user avatar
0 votes
0 answers
30 views

add to wishlist action validate configurable option

I am looking for add to wishlist only configurable product with option details. Here what I need, Magento 2 Add to wishlist event validate swatches if product type is Configurable. As below Image ...
user avatar
0 votes
1 answer
25 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); ...
user avatar
0 votes
0 answers
7 views

I have to catch the KO variable's value spontaneously on the checkout page for postcode in order to call ajax request as soon as 6 digits are complete

I want to fire an ajax request as soon as the postcode variable completes 6th digit of postcode number in order to call ajax request to api to populate the city and state fields. I am getting the ...
user avatar
0 votes
0 answers
21 views

Magento2 : Language translator not clickable

On my website sometimes language translator button (data-trigger="store-language-dropdown") is not clickable in chrome/IE. If I reload the page or clear cache then it is working. Why it ...
user avatar
  • 1,083
0 votes
1 answer
39 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 ...
user avatar
  • 1
0 votes
1 answer
90 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> ...
user avatar
  • 1
1 vote
2 answers
54 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 ...
user avatar
0 votes
0 answers
36 views

Magento 2: Show Checkout Agreement (Terms & Conditions) Based on Condition?

I'm using Magento 2.4 I added new Terms & Condition, but I want to display it based on some conditions, Is there's any way you know to do it please let me know. Thanks.
user avatar
0 votes
1 answer
97 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="#"&...
user avatar
  • 1,168
0 votes
0 answers
6 views

Render content on the fly based on current quantity - Product View Page

So I have a product view page, I want to get the current quantity (e.g. onChange()) of the product and then pass it to the PHP class to perform some calculations. After calculation, I want to render ...
user avatar
0 votes
3 answers
56 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 ...
user avatar
  • 1,083
0 votes
0 answers
87 views

How to get Category Id from CMS Page's Widget to the custom JS file in Magento 2

There are multiple widgets with one category id on each and every widget in Admin ->CMS Page. One of them is given below: {{widget type="Magento\CatalogWidget\Block\Product\ProductsList" ...
user avatar
0 votes
1 answer
114 views

Jquery not triggering for the change(function())

jQuery('input[name^="ko_unique_"]').trigger("change"); jQuery('input[name^="ko_unique_"]').change(function() { var v = jQuery(this).val(); ...
user avatar
0 votes
0 answers
18 views

how to change menu display on click in magento 2

I don't like Magento way of showing the dropdown menu on the phone screen. Is there a way to change how the menu click is displayed like https://www.jqueryscript.net/demo/Multi-level-Side-Menu-Plugin-...
user avatar
0 votes
0 answers
155 views

Magento 2 Fallback to JQueryUI Compat activated. Your store is missing a dependency for a jQueryUI widget

We are using Magento 2.3.5 version and using infortis theme and here is the requirejs.config.js var config = { paths: { 'smartheader': 'Infortis_Base/js/smartheader', 'stickyheader'...
user avatar
  • 1,123
0 votes
0 answers
37 views

Checkout Page: Custom Boolean Checkbox won't save value on Quote and Order

Hi I'm trying to capture/detect if the Shipping Address is changed or Selected. If New Address is added it should return true as well as it should check the custom checkbox I created. Same with old ...
user avatar
  • 1
0 votes
0 answers
97 views

Magento 2: Month Range In Date Picker

I'm made custom report, I added date-picker, I just want to add Month Range, like User can only able to generate any three months report. but I can't figure out how to do that. Here's my code: HTML &...
user avatar
0 votes
1 answer
23 views

Font family select is not applying at the same time, its getting updated when I select next font family

this is my select option in html <div class="control"> <select id="selected_font_id" data-bind="value: getObservable('selected_font'), ...
user avatar
  • 11
1 vote
0 answers
17 views

Magento 2 - Load data from store instead of hardcoding

I am creating a new tag programmatically and append it to the DOM. Currently I hardcoded the phone number, because I don't know exactly how I can load it from the store by using javascript. This is my ...
user avatar
  • 2,380
0 votes
0 answers
201 views

Magento2 how to get payment method using jquery or knockout

Magento 2 how to get payment method using jquery or knockout when customer click on payment method,need to get selected payment method code. requirejs-config.js var config = { map: { '*': {...
user avatar
  • 1,123
0 votes
0 answers
27 views

Jquery dlmenu with Ajax for multilevel click not working properly

I have a custom menu which has been created with dlmenu and ajax. For first level, it has been come the first level menu ul li through Ajax fine and after that, dlmenu is working fine and has been ...
user avatar
0 votes
1 answer
24 views

Using Jquery click code in Magento2

I am needing to track a click on a link in Google Analytics so I am adding the below to the footer of my Magento 2.3 website. I have jquery on the site but for some reason the below cost is not ...
user avatar
  • 771
0 votes
0 answers
31 views

How to add loader for particular block in magento2

I want to add a loader for a particular section on the home page. I tried with Magento loader. But it's showing for the whole page. I want to show the loader only for a particular section. How to do ...
user avatar
  • 2,460
0 votes
1 answer
155 views

Magento 2: Remove unused JS jquery/ui-modules/slider.js

On Magento 2.3.5 how to remove jquery/ui-modules/slider.js I am trying to remove it from default_head_blocks.xml <remove src=" jquery/ui-modules/slider.js"/> view.xml <item type=&...
user avatar
  • 1,123
0 votes
1 answer
166 views

Execute jQuery after foreach loop in knockout template [duplicate]

I am trying to execute some custom code after a knockout template has fully rendered. The template is Magento_Catalog/list/listing.html The relevant part of the template for this problem is: &...
user avatar
  • 249
0 votes
1 answer
170 views

Magento 2.4 - Make uiComponent a slick slider / run jQuery after uiComponent finished rendering [duplicate]

I want to make the "recently viewed products" widget a Slideshow, using slick Slider. Here's what I did so far, although this might not be the correct approach: I copied template and ...
user avatar
  • 249
0 votes
0 answers
25 views

Magento 2 extend errorPlacement in knockout

I need to extend errorPlacement from validation.js in Magento_Checkout/web/.../email.html I want to append error's (in checkout login section) in a custom div created by me in email.html. I tried 2 ...
user avatar
0 votes
1 answer
47 views

Make complete sidebar sticky?

I'm trying to make the complete sidebar sticky. I don't think it's possible with only css because there are two elements with dynamic height: .sidebar.sidebar-main { position: sticky; top: 0; } ....
user avatar
  • 148
2 votes
0 answers
81 views

How to use Youtube Player API with jQuery in in Magento 2?

I'm using Magento 2.4 and i'm trying to use Youtube player API with jQuery in Magento 2 .phtml file like this first: <script> require(['jquery'], function($){ var tag = document....
user avatar
  • 115
0 votes
0 answers
61 views

Magento 2: Jquery Expand/collapse include icon

I am using this code and it works great <script type="text/javascript"> jQuery(function($){ $(".block-layered-nav dt").click(function(){ ...
user avatar
0 votes
2 answers
472 views

Magento 2 How to get all customer shipping address

How do get all customer shipping address? Magento 2.3.5-p1 version for the customer table, we can use - customer_entity table name for the customer address table, we can use - customer_address_entity ...
user avatar
  • 1,123
0 votes
0 answers
48 views

How can use jQuery or javascript in amp pages Magento 2

I have used amp module in Magento 2. I want to add custom jQuery to add a class on button click but jQuery is not working. Even I tried to run jQuery in console but this is not working in console also....
user avatar
  • 1,957

1
2 3 4 5
16