Questions tagged [jquery]

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

302 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
62 views

Magento 2.3.4 theme use different logo file for mobile and larger screens

I need to use 2 different logo files, one for mobile and one for desktop view. I have one single custom theme (parent is luma) and I am wondering how to achieve this by using jquery and/or CSS. Is ...
1
vote
0answers
30 views

After including a JS file in my Magento 2 custom widget, i m getting $. is undefined

I have created a custom widget that requires jQuery code. I have included the js file but when I'm trying to view the changes in the frontend, I'm getting jquery error. I tried including the file ...
1
vote
1answer
65 views

Magento 2.3.3 -Load Custom Jquery after the Shipping Form load

I have added jquery on other click events they are working fine but when i am trying load jQuery after the Shipping page load. I want to hide my custom added fields in shipping page but they are not ...
1
vote
1answer
83 views

How to Override jquery widget method in Magento 2?

I'm trying to override Magento_Checkout/js/sidebar.js _initContent method. I need to delete two events from it and create my own events instead. Is it possible without copying the full method from the ...
1
vote
0answers
67 views

Magento 2.3: How to hide only free shipping method if postal code 2nd index is 0

I want to hide only the free shipping method on the checkout page if the postal code 2nd index is 0. I tried this but it's not removing from shipping methods. require(['mage/url', 'jquery','domReady!'...
1
vote
0answers
159 views

Non - AMD Module - JSPDF - Magento 2

We are trying to implement JSPDF on our product pages. We have created a module to load the JS on these pages but we are coming up short. We are getting constructor errors or not defined errors ...
1
vote
0answers
55 views

How to add selected items on a page to a separate block in Magento 2?

Please help with the implementation of this functionality. I have a separate module with a separate route. There will be elements on the page (picture and checkbox under it) as in the screenshot. ...
1
vote
0answers
104 views

How to hijack a button's click event with my own ajax get function? Magento 2

I am tying to add a new button to an existing admin page. I want to call an ajax get() function on this button click. I created a main.js script file which I see is loading on this page since when I ...
1
vote
0answers
239 views

Slick Slide After Scroll Slide is Working Magento2

I have used Slick Slider for Product Comparison in Magento 2.3. The issue here is when I scroll alone the slick slider gets activated. But I need to load slider before. Its Like I Am new to ...
1
vote
0answers
59 views

How to use jquery function date time picker in magento 1.9

<script> jQuery(function() { jQuery(document).ready(function() { jQuery(".date").datepicker(); jQuery(".date").datepicker({ onSelect: ...
1
vote
1answer
344 views

Magento 2: Autoplay product video when video icon on left panel is clicked?

I want to autoplay video when video icon on the left panel is click. Once the video icon is click the video on the container will automatically play. Here is the current classes on the video icon: ...
1
vote
1answer
325 views

How to add classes input focused on checkout and product review forms?

If an input is in focus or has a value, I want to add a class to all inputs parent .field div. For example on the product page review form or on the checkout page shipping form. If the input is in ...
1
vote
0answers
66 views

How do I get text value for span that is populated with KO?

inside a js file I need to get the value for $('.modal-custom.opc-sidebar.opc-summary-wrapper.custom-slide span.cart-price span.price').text() The probles is that span.cart-price span.price is ...
1
vote
0answers
253 views

Magento 2 : unveil is not function

I am getting below error: Uncaught TypeError: $(...).unveil is not a function stuck in this. <script type="text/javascript"> require([ 'jquery', 'jquerypopper', '...
1
vote
0answers
41 views

Magento 2.3.1 js error 500

In Magento 2.3.1 everything I put a product in Wishlist I get this error in console of all browsers: GET https://mystore.com/el/customer/section/load/?sections=customer%2Ccompare-products%2Clast-...
1
vote
0answers
1k views

Magento-2.2.7 “JQMIGRATE: jQuery.attrFn is deprecated” error in console

This error occurs in browser console once in every 6-8 times and jQuery doesn't work a all on the page. when I reload the page everything works fine.
1
vote
2answers
390 views

Magento 2 Execute jQuery when minicart is done loading

I'm having the problem currently where I need to run some jQuery on my Minicart. However, I can't select anything from the Minicart because the jQuery is executing before the Minicart is actually ...
1
vote
1answer
495 views

How to get custom product attribute values in magento 2 jquery?

I want to get custom product attribute ('deliverytime') values for checkout config in jquery Here is the code for getting default product attributes jquery date-block.js function ...
1
vote
1answer
28 views

Magento theme displays errors and responsive display after refresh

We have a Magento webshop (1.9.3.2) with Ultimo theme, which appears to have some strange problem in a few browsers - we've discovered it's only on Chrome and Opera so far. When you first watch the ...
1
vote
1answer
670 views

Uncaught Error: Mismatched anonymous define() magento 2.2.4

Below is the console erros is getting in frontend. Checked .htaccess in pub, pub/static and root all .htaccess are identical to Magento 2.2.4 version. js bundling/minification is enabled and ran ...
1
vote
0answers
230 views

How to change product price using drop down option in Magento 2?

I want to change product price when drop down option is change. Here drop down is dynamic means you can add N number of drop down and it's options from admin side. (Note: This is not a product custom ...
1
vote
1answer
21 views

Custom Page in Magento2

I am new to Magento 2. We are currently in the process of migrating from Magento 1 and I have been tasked with updating our custom pages to work in Magento 2. I have a page (using the page editor in ...
1
vote
0answers
86 views

how to validate before save stocktaking in magento 2 backend

Help me ! i saved the qty successfully using ajax popup, but i want hide 2 button in popup Close Save When you click the save button -> save When you click the save Close-> not save My jquery ...
1
vote
0answers
250 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 ...
1
vote
0answers
56 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 ...
1
vote
1answer
138 views

Magento 1.9.3 International Phone prefixes

Hello I would like to get help on adding the country code as prefix (+44, +234, +233 etc) in magento. I am currently using 1.9.3.2 version.Thanks
1
vote
0answers
494 views

Toggle switch to change between Incl. and Exc. TAX with ajax continious loading

I've coded up a quick toggle switch which will change the price display between Including and Excluding tax using "display: none" with jQuery hide and show but i'm having problems with an Ajax ...
1
vote
0answers
52 views

Issues creating a widget with repeated functionality in Javascript

Have a controller class setup as a widget. Labeled here as "buttonController". I'm trying to call and instantiate an instance of the controller widget per each button. Everything seemingly works, ...
1
vote
1answer
368 views

Magento 1.9.2. - Update in real time Tier Price when i change quantity

I'm trying this code because I want to see the price of the product change dynamically when in the input field of the quantity exchange the number (this only for the products that have the tier price)....
1
vote
1answer
400 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) ...
1
vote
1answer
421 views

Magento2: Update Qty of product in bundle

I am updating the quantity of a radio button in a bundle via jQuery: $ ('input. Qty'). Val (4) Unfortunately the product summary does not change. When I put the value ("4") in the same input field ...
1
vote
0answers
94 views

Is the JQMIGRATE necessary for Magento 2?

Just out of curiosity: Is the JQMIGRATE necessary for Magento 2? Because it is complaining about using a deprecated psuedo event. Please see the below screenshot. If it's not necessary for Magento ...
1
vote
1answer
530 views

How to hide specific days from admin form calendar field in magento 2

I want to disable week days (Saturday & Sunday) in admin form calendar field. check below screen-shoot. Below is my field code. $fieldsetDirector->addField( 'attendance', 'date', ...
1
vote
0answers
533 views

Magento 2.2.4 Implementing Bootstrap 4 Carousel to Homepage | JS seems to not be functioning

I've been trying to get the Bootstrap 4 Carousel to work on my homepage and I've been facing an issues that seems like the JS may not be functioning. This is the way that I went about doing so. I ...
1
vote
0answers
165 views

Magento 1.9 - Update product price using jQuery

I am using a jQuery script to add static price to the product's regular price on the product detail page. On the product page, the price is updated, but the price is not updated in the cart when ...
1
vote
1answer
1k views

How to Auto Select Color Option for Products with Only One Color (configurable product)?

I have some configurable products with a custom color swatches attribute. Lot of them have just one color options, so i 'd like to mark the option as selected in the product page. I added a custom js ...
1
vote
1answer
2k 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/...
1
vote
0answers
301 views

TypeError: $.ui is undefined in checkout

This is driving me mad! Something is mucking up the loading of jQuery and jQueryui in our checkout - we have tried everything we can find on the web - (we are using theme porto) Their support is ...
1
vote
1answer
3k views

Sending variable to a bootstrap modal

I have seen this asked before but a lot of the answers I found where people looking to get a variable into a modal to query a database. However thats not what I want. I just want to send a variable ...
1
vote
0answers
268 views

JQuery gets loaded after script sometimes

I implemented owlcarousel like this <script> require([ "jquery", "Vendor_Module/js/owl.carousel.min" ],function($){ $('#slider').ready(function() { ...
1
vote
1answer
67 views

Add custom jQuery in M2.2

I have written a js file which is like. $(document).ready(function(){ $('#test').click(function(){ > Alert('coming'); }) }) I have created a custom theme which is based on luma and I have ...
1
vote
1answer
112 views

M1.9 Jquery issue in CMS page

In my Magento installation I have JQuery 1.10 already included but I need to have a newer version of it. I added the latest version of JQery via the xml update tab in the cms page and I wrote my ...
1
vote
2answers
168 views

Jquery post request returning html

I am trying to make an AJAX request in my Magento 2.1.8 custom module. The Http Post Request is returning all of the data i expect it to in JSON format, However it is also adding on some of my html ...
1
vote
1answer
720 views

How to use 2 third party jquery plugins in one custom module Magento 2

Slick for slider. Fancybox for Custom HTml forms ( SignIn,signUp ...) In /var/www/html/magento2/app/code/Custommodule/ReviewRating/view/frontend/requirejs-config.js var config = { deps: [ "...
1
vote
1answer
79 views

Add jquery dependant js via module

I am trying to add a jquery based module to magento 2 via a module. But I keep getting these errors: ma5menumin.js:1 Uncaught ReferenceError: $ is not defined at ma5menumin.js:1 callma5.js:1 ...
1
vote
1answer
606 views

Order Id: Popup modal in magento 2

I have overrided the core(history.phtml corin module-sales) phtml file and created the custom link using popup modal to update the custom status as cancel initiated. And it works only for the last ...
1
vote
1answer
922 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/...
1
vote
1answer
5k views

Blocked a frame with origin from accessing a cross-origin frame

when I want to go onclick to next page's specific div it shows this error . jquery.js:3123 Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a ...
1
vote
0answers
2k views

Magento 2:Get input field text value in js file from template file

I have a added a custom block in checkout section using a custom module.(http://i.prntscr.com/BRC2VcknSZiLsFpgzzPSAg.png) I want to get the input text field value in js file(from .html file). I have ...
1
vote
0answers
267 views

MAGENTO 2 Checkout javascript not showing shipping address

i have a problem in the checkout with the Magento 2.1.6 version. In the second step only the cart resume is showed and i have this error in the console: Uncaught RangeError: Maximum call stack size ...

1
2
3 4 5
7