Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
14 views

Calling a JS function from a widget from a different widget?

How can I call giveAlert() function that's in newsletter.js from within landingpage.js? landingpage.js define([ "jquery", "Ignite_Orgbf/js/js.cookie", "...
0
votes
0answers
20 views

Three is not defined in Magento 2

new THREE.WEBGLRENDER Three is not defined when i'm using it in Magento 2 with requirejs . THREERENDERER = new THREE.WebGLRenderer({ context: spec.GL, canvas: spec.canvasElement });</quo you can ...
0
votes
1answer
22 views

Magento 2- How remove js files

I am trying to remove some js files from Magento 2 upload in the frontend. This is my code but it doesn't work because when reload category page and i open sources->coverage of chrome i see ever ...
0
votes
0answers
16 views

How can I get my custom modal to work in with my js

This is a fiddle I have with it working but I would not like to apply it within magento http://jsfiddle.net/7yhmkf98/ I have a requirejs-comfig.js file set uo like this var config = { paths: { ...
0
votes
1answer
13 views

jQuery function call on focus out for form field not working

I have created a Magento admin form with following fields. $skuField = $fieldset->addField( 'sku', 'text', [ 'name' => 'sku', 'label' => __(...
0
votes
0answers
25 views

Magento2: Sometime js load sometime js not load properly

I got the JS error in console. Sometime when page load got the JS error and Sometime when page load it is working. I don't know what's the exact issue. I disabled all 3rd party extension after that ...
0
votes
0answers
18 views

Make product data tabs collapsed by default

I want all product data tabs on the product details page to be collapsed by default. I edited this line in app/design/frontend/<Namespace>/<theme>/Magento_Catalog/templates/product/view/...
2
votes
0answers
15 views

Magento 2 How to remove Field required validation, if form Div is Hidden

Magento 2 How to remove --data-mage-init='{"validation":{}}-- when div is hidden, I hide div when select box value is not equal to 0 using Script <div class="row"> <...
0
votes
0answers
11 views

how to refresh admin side edit page block after inserting image of custom module using AJAX in magento1.9

I have create one custom module to insert image from admin side in custom database same as catalog product in magento1.9 below is my controller function for insert image in custom database. this ...
0
votes
0answers
22 views

How to reload block using ajax in magento 1.9

Below is my controllers/adminhtml/vendorproductcontroller.php to save image. public function imagesaveAction(){ $data = $this->getRequest()->getPost(); $id = $data['...
1
vote
1answer
34 views

Magento 2 Console Error Uncaught TypeError

I have Update Magento version 2.3.4 to 2.4 and now on the product page these errors are coming. Uncaught TypeError: Cannot set property 'migrateVersion' of undefined Uncaught TypeError: Cannot set ...
0
votes
0answers
42 views

Uncaught TypeError: Cannot read property 'offset' of undefined JAVASCRIPT

PLEASE HELP ME GUYS I try to Smooth Auto-Scroll to Next Panel via Mouse Wheel but get some error anyone plz help me how to fix it ''''''''''''''''''''''''''''''' my code function scrollThere(...
0
votes
2answers
21 views

Magento 2 jquery and checkout

In magento 2 (checkout) I need to hide and show some fields. <div class="field" data-bind="visible: visible, attr: {'name': element.dataScope}, css: additionalClasses" name=&...
1
vote
1answer
204 views

How to call javascript function from Observer file in Magento 2

I have created a custom js file in my custom module. app\code\Vendor\Module\view\frontend\layout\default.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/...
0
votes
0answers
12 views

Magento2 add cart value change the QTY instead of updating

Currently the default behaviour is if i have item X in the cart with qty 5, if i put 8 in the qty box and add to cart the new qty is 13 - the expected behaviour we need to for the cart to change to 8 ...
0
votes
0answers
19 views

How to write magento javascript mixin for widget returned as an object?

I need to write magento javascript mixin for the menu.js part which is returned as the object of two multiple widgets. Actual location of the file is lib\web\mage\menu.js which further extends the ...
0
votes
0answers
11 views

checkout shipping page add custom field in magento 2.3.5

Now i added custom field checkout shipping page but issue add custom module custom.js and define layout checkout_index_index.xml but it's not working checkout_index_index.xml <page xmlns:xsi=&...
0
votes
1answer
32 views

jQuery onchnage function call in magento 2.3

How to use custom js in Magento 2.3 add jquery jQuery('.customdrop select').on('change',function(){ console.log(jQuery('.customdrop select').find(":selected").text)); if (jQuery('....
0
votes
1answer
32 views

How to fix XSS in website in url ? Magento 1

I can see that browsing url like this https://www.anywebsite.com/?p=%3Cscript%3Ealert(document.cookie)%3C/script%3E shows alert into browser window. Is their any way to prevent it ? its XSS.
0
votes
0answers
9 views

Step By Step Testimonial Wizard Using jQuery and CSS | Multi Step Progress Wizard

I am trying to be something like this but there are some issues coming in it, can you help me to fulfill this. Error Link https://prnt.sc/um895k My jQuery code jQuery(document).ready(function(){ $(&...
0
votes
0answers
31 views

Please enter a value between NaN and NaN Magento 2

I added a range price slider to my product checkout. Now adding the product works fine. So basically I have a Select input where it contains a dropdown of the price value but I hidden it and made the ...
2
votes
0answers
95 views

How to add “httponly” attribute set on existing cookie ? (Magento 1)

In Magento 1 I can see many of the cookie are without Secure flag and HttpOnly set on website. Is their any way to set Secure flag and HttpOnly set on all server Cookie ? I need to make all server ...
0
votes
0answers
5 views

How to enable add to cart button duplicated on product page due to bootstrap4 display classes

im facing an issue in a theme for magento 2.3 im creating for the company i work for. Here's the situation: I'm using bootstrap4 grid css so i can take advantage of the layout features plus class ...
0
votes
0answers
20 views

Download or save page as HTML on Button click

I want to download or save the page as an HTML when someone clicks on the Download button or link. Please check the below code. <button class='download'>Download</button> <a href='#' ...
0
votes
0answers
64 views

While opening coupon code and trying to go next page it gives Jquery Validate error in Magento 2?

I have created some steps between address and payment form in Magento 2. When i open the coupon code and want to go on next step ( Payment Page Step ) It gives me an error Cannot read property '...
0
votes
1answer
39 views

When click Image and show clicking Image in popup in magento 2

How to create, When click Image and show clicking Image in popup. This is my code :- echo "<td>"?><img src="<?php echo $this->getMediaUrl() .'brand'. $data->...
0
votes
0answers
23 views

Magento2 How to add custom js for checkout billing address only

Does anyone know how i can add custom js for billing address form only ? i need to get default selected country from billing address
0
votes
0answers
34 views

magento 2.3 call updatePrice or reloadPrice on click event

I've added a checkbox on my product page so when the user clicks on it, the product price gets changed. In order for this to work, the click event should call reloadPrice(), a javascript method ...
2
votes
2answers
93 views

Magento2.3 : Pagination - jump to top of pagination at PLP page

I have a problem with Buttons in Pagination. If the user clicks the button, it reloads the page with loader and settles down at the current page scroll position. Is there any method to force the ...
0
votes
1answer
81 views

How to redirect to controller using jquery ajax in magento 2.3.5

I want to pass dynamic text-box value to controller using ajax, so if anyone have idea about it then please share with me. Thanks In Advance
0
votes
2answers
166 views

How to implement jQuery click event in magento knockout JS function

how to implement below jQuery code into knockout js, Actually I'm trying to call this function on a button click event using knockout js, but it's not working HTML code: <div> <ul class=&...
0
votes
0answers
33 views

How to create autocomplete on click on textbox in magento2.3.5

I want to create a dynamic textbox and using the id attribute to use autocomplete functionality in this. I have Developed a dynamic id for each textbox on click of add Item button and my id is ...
0
votes
0answers
14 views

How to use owl carousel for my category wise product on home page in mageno2?

Hello I want to display My Category's product in owl carousel, i already display product on homepage but i want that product in my owl carousel slider please help me without using any extension please ...
0
votes
0answers
34 views

Jquery callback function cannot read property of undefined using knockout js

1.lets assume placeOrderClick function is called.within this there is a eprotect API success callback function called submitAfterEprotect. i'm trying to call placeorder function using self in ...
0
votes
2answers
40 views

Magento 2.3 jquery accordion seems blocked

I am aware of the built in Magento accordion but do not want to use it. I want to use jQuery accordion. In my theme web/js/custom.js I have the following define([ "jquery", 'accordion', ], ...
0
votes
0answers
6 views

Unread jQuery script in custom phtml file included with ajax in Magento 2

I have included in the product page a custom external phtml file from a module which is called with ajax on click. The html and php code is read correctly, only the jQuery code is not read and is not ...
1
vote
0answers
21 views

How to create a mixin for js/modal/confirm.js

I want to create a mixin for js/modal/confirm.js but that widget returns some javascript to make it possible to create an instance of the widget instead of the widget itself. So it returns this // ...
1
vote
0answers
12 views

jQuery widget: adding ReuireJS dependency and calling public method

I have a custom widget defined like this define([ 'jquery', 'jquery/ui'
], function($){ $.widget('myNameSpace.myWidget', { somePublicMethod: function () { ...
1
vote
0answers
33 views

Magento 2 - Ajax call on controller working in desktop but not on mobile

Here is the ajax call in which data is not passed in controller This is found only in mobile device and working fine in desktop. Thanks in advance. $.ajax({ type: "POST", ...
2
votes
0answers
24 views

Select country through Jquery in Origin Address of Shipping Settings

I am trying to set Country for Origin address using jQuery in Shipping Settings of Sales (Store Configuration). The issue is, on change of country option using jquery, the ajax to fetch region is not ...
0
votes
0answers
26 views

How to validate and Submit Login Form Using Ajax

i want to create login form using ajax with validation in magento 2.3.5. so can anyone have idea about it then please share with me. Thank you in advance.
0
votes
0answers
26 views

How to display login on hover in magento 2

In this i want to create a custom module in that one button is in header for login and on hover of that button i want to display login form with ajax.
0
votes
0answers
21 views

Magento 2: Error Disable some dates in jquery Datepicker

I try to add datepicker in magento 2 checkout page like this: ko.bindingHandlers.datepicker = { init: function (element, valueAccessor, allBindingsAccessor) { var $el = $(...
0
votes
1answer
124 views

Magento 2 - Custom Module JS error

I am trying to add custom js file using my custom module. But getting below error in console. Uncaught ReferenceError: Plyr is not defined DevTools failed to load SourceMap: Could not load content ...
0
votes
0answers
35 views

How to remake js code on jquery ui widget

I have a simple code that animates the appearance of a mini-cart modal window. <script type="text/javascript"> require(['jquery'], function($){ $(document).ready(function(){ ...
3
votes
1answer
159 views

How to bind an event handler to 'street[0]' input on the checkout page?

I've been trying to ensure an alert displays on a user typing in PO BOX number in the street address field on the checkout page, saying we don't ship to PO BOX. My jQuery code doesn't seem to bind a ...
0
votes
0answers
57 views

Animation for a mini-cart not working

How to make an animation to show and hide the mini-сart? Expected result: by clicking on the minimap, the block flies from above to its position Found a way using jquery UI I found a way using ...
1
vote
0answers
49 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 ...
0
votes
0answers
20 views

Magento 2 - How to use Ajax Auto completer?

I'm working on migration from Magento 1.9.* to Magento 2.3.* , in one of my phtml code I have this javascript Ajax.Autocompleter function, as I know this function is not available in Magento 2.3, how ...
0
votes
0answers
30 views

Cannot read property 'version' of undefined error while hard refreshing the page in magento 2

Whenever I am hard-refreshing the page, it displaying the below js error. jquery-ui.js:37 Uncaught TypeError: Cannot read property 'version' of undefined at jquery-ui.js:37 at mixins.js:87 at Array....

1
2 3 4 5
15