Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
2
votes
2answers
2k views

Magento 2: Checkout button on product page

Is there a way to add a 'Add to Cart and Checkout' button to the product page, so that the product is added to the cart and then takes the user straight to the checkout?
2
votes
1answer
656 views

How to solve confilict with jquery-1.10.2.min.js

I write a vertical tab in my store home page, and I should use jquery-1.10.2.min.js. but it has confilict with other scripts and somethings showing wrong in store. DEMO of vertical tab. How can I ...
2
votes
2answers
2k views

Documented way of removing prototypeJS with Jquery and fix the ajax search and 1 page checkout?

Searched everywhere, My question is basically if someone knows if its possible to remove prototypeJS with Jquery and fix the ajax search and 1 page checkout? I believe also product search and add ...
2
votes
1answer
97 views

Magento 2 - Understanding text/x-magento-init

I try to better understand the concept of text/x-magento-init. I understand that it allows us to define script components that do a certain task, which we then can use as often as we like in any ...
2
votes
1answer
55 views

Unable to add elastislide js file in magento 2.3

I am trying to add elastislide, for that, I added this code in phtml file <div class="brand_block"> <ul id="carousel_<?php echo $chunk2->getId(); ?>" class="elastislide-list"> ...
2
votes
2answers
64 views

What is the meaning of “*” in magento custom jQuery

I have a code of jQuery: <script type="text/x-magento-init"> { "*": { "magepowSizeGuide":{} } } </script> What can be the ...
2
votes
2answers
166 views

, or ) expected in Jquery function call in magento 2

, or ) expected in Jquery function call in magento 2. I'm getting this error in custom jquery file. I'm getting this following error in internet explorer browser. SCRIPT1006: Expected ')'
2
votes
2answers
98 views

Juery Ui & Autocomplete error

Uncaught TypeError: Cannot read property 'element' of undefined I am getting this error when I load the page. This is the script i have written var stateArr = <?php echo json_encode($...
2
votes
2answers
763 views

Unable to load javascript

I'm trying to load javascript file in app/code/Anime/Shipping/view/frontend/web/template/shipping.html which overrides the core file Magento_Checkout/template/shipping.html. I can see that I'm able to ...
2
votes
1answer
88 views

How to change deafult behaviour cleander date using custom js in magento 2 Product edit page at backend

I have created custom attribute for Product as date and time and want to disable past dates?
2
votes
3answers
5k views

Magento 2, Cannot read property 'ui' of undefined

I don't get why adding my custom js file causes below issue. Please help understand the cause. Let me know if more details should be provided here. Is it dependency issue? edit: My requirejs-config....
2
votes
1answer
5k views

Change Meta tag information dynamically, with Jquery

I want to change contents of Meta tag dynamically, Here is the code which which will call the function "changeMetaInformation()" of javascript <a onclick="changeMetaInformation('<?php echo ...
2
votes
1answer
585 views

Magento 2 - Jquery not triggering any events for Product attribute input fields in new product form

I have a product attribute named stone_weight. I'm trying to get the value of the attribute based on it's name name="product[stone_weight]" on change event. But it is not triggering any event. How can ...
2
votes
1answer
5k views

jQuery ajax data to controller

I am trying to make my first ajax request in magento to controller file but can not get it working. My .js file is: jQuery.ajax({ type: 'post', url: 'vendor_module/index/...
2
votes
3answers
4k views

Magento 2.1 Uncaught TypeError: Cannot read property 'replace' of null

Hi whenever I try to create a new product I get the following error in the console: Uncaught TypeError: Cannot read property 'replace' of null This is the only time I get this, I can create pages, ...
2
votes
1answer
287 views

Configurable JS Conflict

My problem is that only few configurable products have JS error on their page while its still same format just different description, price etc. The product tabs are not working and the content of all ...
2
votes
2answers
760 views

Can't add jquery script

I am trying to add a enter link description here what I have done : add below div in 1column.phtml <div id="countdown1"></div> added below code in footer script (inside <script> ...
2
votes
1answer
961 views

jQuery programatically set options of dropdowns

I am lost, please take a look at http://www.austrokamin.at/edelstahlkamine/edelstahlkamin-doppelwandig/bodenplatte-dw.html I need to set the two dropdowns with jQuery. For example: jQuery('#product-...
2
votes
1answer
282 views

Include resize img in this jQuery

My "more view" images are being called by the following jQuery but it's leaving the thumb images huge at their original size. How can I resize them proportionally to 100px? var imagefile='<?...
2
votes
2answers
79 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 ...
2
votes
1answer
2k views

Slick slider is not working properly in Magento2.3

I would like to use slick slider concept for compare products so I have implemented it on my Magento site. But It's not working as expected though the script has been loaded. I'm not sure where am I ...
2
votes
2answers
1k views

How to add custom field in registration form and add jquery validation in Magento2.2.5?

How to add custom field in registration form and save in database and add jquery validation in Magento2.2.5? Any help would be appreciated
2
votes
1answer
649 views

Load a jQuery script after fully loading the page

I'm struggeling with this. My jQuery script works fin with every of my input, but not with the input loaded by AJAX, such as the mini-cart input. The code (and the css) is used to do this : add to ...
2
votes
1answer
168 views

how can we add a jQuery Library in phtml file Magento 2

I am using below code in my phtml file. Afte using below code: province drop down is not showing.
2
votes
1answer
257 views

jquery plugin error “Uncaught TypeError: $(…).[plugin function] is not a function”

I am using Magento 2.2.6 and I am trying to include a jquery plugin (stickybits, in this case). The jquery plugin file is successfully called in my requirejs-config.js file and I can see that the file ...
2
votes
1answer
625 views

Magento 2.2.6: Product collection does not apply the filter

EDIT: I have seen that in magento 2 the ListProduct page is cached, for this reason once loaded it does not enter. Is there any way to modify the query returned by ListProduct? I extend the class: ...
2
votes
1answer
2k views

Magento 2 how to validate customer registration form on keyup event

I am working on a project where I need to validate customer registration form as customer types. I want to use the event keyup for inputs. I want to change the default messages also. Right now I am ...
2
votes
1answer
500 views

How to add custom js file in Magento 2

I am trying to add two custom jquery bootstrap files jquery.bootstrap.wizard.js gsdk-bootstrap-wizard.js Added both files in app/design/frontend/Vendor/Theme/web/js/customwizard/ ...
2
votes
1answer
475 views

Magento 2 dynamically add rows to tier price

Task : To trigger Add button so that a new row is inserted in tier price block every time the loop runs via jquery I have loop which is triggering the click on Add button but the issue is that the ...
2
votes
1answer
391 views

I have updated jQuery & jQuery UI to: jquery-1.9.0.min.js and jquery-ui-1.9.2.min.js

I have just updated jQuery & jQuery UI to: jquery-1.9.0.min.js and jquery-ui-1.9.2.min.js And... all my unobtrusive Ajax calls (Ajax.ActionLink, Ajax.BeginForm) stopped working properly -...
2
votes
1answer
4k views

Uncaught Error: Mismatched anonymous define() module in magento 2 .?

I have use mCustomScrollbar jquery plugin but there some error have come & error like: Uncaught Error: Mismatched anonymous define() module.. Help appreciated. Thanks. My mCustomScrollbar ...
2
votes
1answer
633 views

Uncaught Error: Mismatched anonymous when calling JQuery in Magento 2 frontend

i use jquery in front-end for ajax in phtml page, but i'm getting this error: Uncaught Error: Mismatched anonymous define() module: function ($, _, template) here's my code: <script> ...
2
votes
1answer
496 views

Ajax Layered Navigation load event to use in jquery

I integrated lazyload on an magento layered navigation page. First page load runs well, but when I use navigation no more images are shown. This is propably due to the ajax call updating instead of ...
2
votes
1answer
173 views

getDescription in the slide down panel

I am trying to display the description for each product in the slide down panel. I am using a slider to display product images where I have a on hover buttons first one adds the product to basket and ...
2
votes
1answer
1k views

how to add custom options to grouped products with customization..?

I have multiple simple product. and I have added this simple product in grouped product. As I know Magento allows only the simple product with custom option. Now I want to add the custom option to ...
2
votes
2answers
342 views

Please Choose to register or to checkout as guest

Everything was working fine on one page checkout, But now it seems to give me a error of Please Choose to register or to checkout as guest even if I select any of these option and try to click on ...
2
votes
1answer
455 views

Store locator JS not working

I'm trying to implement the https://github.com/googlemaps/js-store-locator into a website, however something really strange seems to occur. When I load the Jquery file <script src="<?php echo $...
2
votes
2answers
894 views

How to display attribute values of second dropdown box in configurable product

I have created a configurable product in magento store with two attributes say color and size. On product page second dropdown box (say size) is disabled by default untill any attribute value not ...
2
votes
1answer
2k views

CSSJSHTML - What does this code means?

I've some scripts in magento due to the confliction of the below, it is causing some glitch. I need to dig into the below scripts, so that I can find what is the causing the error. Where can I find ...
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"> <...
2
votes
0answers
92 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 ...
2
votes
0answers
23 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 ...
2
votes
0answers
21 views

Magento 1.x - Ajax auto choose product

I want after I have pasted sku or name product into the input seach, it will automatically check and notify. I am currently using autoComplete jQuery. But the problem is that if it doesn't show drop ...
2
votes
0answers
98 views

Customize native loader

I would like to challenge the template structure of Magento 2 loader which is declared in the lib/web/mage/loader.js but I can't find where this widget is calling by Magento to override the javascript ...
2
votes
1answer
1k views

TypeError: t.validator.methods[a] is undefined issue in jquery validation in magento2

I am facing this issue TypeError: t.validator.methods[a] is undefined after adding jquery validation in my form. Here is my validation code: <script src="http://ajax.aspnetcdn.com/ajax/jquery....
2
votes
1answer
188 views

Magento 2.1.7 - Unable to send form data to controller using AJAX

I am trying to fetch input value but I am unable to get values in the controller. Here is my code, Controller\Index\Index.php <?php namespace Crud\Crudatfrontend\Controller\Index; class Index ...
2
votes
0answers
79 views

Magento-2 jquery widget timing issue

I recently started using jquery widgets in magento and come to know that magento extends jquery-ui widgets through the use of widget factory and customises them according to need and then again return ...
2
votes
1answer
136 views

Add custom block under selected shipping methode magento 2 not working

I am creating a magento2 module and I want to add an html block to selected shipping method: I am using jQuery to achieve this but I will accept other workarounds all I want is to make this work. I ...
2
votes
0answers
202 views

jQuery got no function after AJAX call

I'm having a problem in using horizontal navigation. When I sort something, at I changes show products with ajax the navigation isn't functional anymore. The click function in jQuery is still working ...
2
votes
0answers
2k views

magento 2 Uncaught TypeError: Cannot read property 'version' of undefined

I got below error randomly in front-end and when all modal popup not working when below error occurs. Uncaught TypeError: Cannot read property 'version' of undefined I have override admin product-...

1 2
3
4 5
15