Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [jquery]

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

Filter by
Sorted by
Tagged with
3
votes
3answers
12k views

jquery not defined error in magento 2

I am trying to bring banner scroll in magento2. I am using owl carousel for this purpose. Everything have done and implemented and is showing in firefox without any errors. But when checked in chrome, ...
0
votes
0answers
358 views

jQuery get grand total from summary Magento 2

I'm trying to retrieve the grand total from the summary on the checkout/cart page through jQuery. However, the summary is being loaded with AJAX in some other file which causes my jQuery to not ...
1
vote
1answer
571 views

Magento2 confirm widget: Continue with url

I have an extension with a backend view where I have a button which routes to another url. When the user clicks the button I want to show a pop up which asks him a second time if he/she really wants ...
0
votes
2answers
2k views

Smooth scroll to top pagination from Ajax extension

How can I implement smooth scroll to top in a ajax extension that does pagination. The extension has the code following if (block && amshopby_scroll_to_products) { $$('body')[0].scrollTo(...
0
votes
2answers
588 views

Magento2.0.6 Responsive Menu doesn't work, body class still there after “click” to close

In Luma of Magento2 theres a build in responsive burger-menu included. We have the problem that once you open the nav, the body class get the classes nav-before-open nav-open, and if you click on it ...
1
vote
0answers
27 views

Methods are called before Jquery is init

I have a lot of errors in my magento 2 site. Seems that functions are called in a strange way. (They're in head, and they're supposed to be in the body) How can i solve this?
1
vote
1answer
470 views

Magento 2: colorbox jquery not working

I am working on magento 2 and i want to open popup in my product detail page. But i have found problem with jquery issue and its not come every time. Here is my requirejs-config.js var config = { ...
1
vote
1answer
4k views

Function in not defined in custom jquery when using href=javascript

I am trying to setup slider. When i connect jquery library just as <script src="></script> and connect slider code just as <script></script> with no require([ 'jquery', '...
17
votes
3answers
7k views

Magento 2 add custom product attribute validation from install script

[ 'type' => 'int', 'backend' => '', 'frontend' => '', 'label' => 'XXXX', 'input' => 'text', 'frontend_class' => 'validate-greater-than-zero', 'source' => '', 'global' =>...
1
vote
2answers
4k views

How to create Product list widget with owl carousel on Magento 2?

My steps: Copy magento-2-directory/magento/vendor/magento/module-catalog-widget/view/frontend/templates/product/widget/content/**grid.phtml** to magento-2-directory/app/design/frontend/Agestor/...
5
votes
3answers
16k views

Magento2 : ReferenceError: jQuery is not defined

I am trying to add custom jquery code into my module but it is not working. app/code/Custom/Module/view/frontend/web/js/my.js jQuery.noConflict(); jQuery(document).ready(function(){ alert('ok'); ...
3
votes
2answers
999 views

Block with jQuery autocomplete in checkout page

How can I add jQuery autocomplete to checkout custom block? Part of my js file code: if (...) { $(".hello").not(".red").hide(); $(".red").show(); var availableTags = [ "ActionScript"...
0
votes
0answers
280 views

How to create jQuery cookie in cart and show in checkout page on Magento 2?

I Try to set a Jquery cookie in the cart page with a custom product attibute, and i need to show this attribute on the checkout page. But i can't find anything how to set and use a cookie. The only ...
0
votes
2answers
883 views

Custom JS in Magento2 product page

(This is the plugin I am trying to use) http://zurb.com/playground/twentytwenty I have app/design/frontend/myvendor/mytheme/requirejs-config.js and it looks like: var config = { map: { ...
0
votes
2answers
2k views

Magento Uncaught syntaxerror: unexpected token <

I have this function: public function adminhtmlWidgetContainerHtmlBefore($event) { $blockID = Mage::app()->getRequest()->getParam('id'); $js = "<script type='text/javascript'> ...
0
votes
0answers
1k views

How can make jquery ajax controller in magento 2

I am not able to find correct approaches to done this work. I found some resources but there they guys are using model files also but they didn't explain about that files. My codes are below ...
0
votes
0answers
279 views

Lightbox not working

The Lightbox jquery is not working. For Photo Gallery it is hover by mouse and zoom in zoom out effect and modal open when user clicks on that
0
votes
0answers
3k views

How to use Ajax in magento 2 custom module

I am working on one custom module and i need product load when any ID is clicked. Loading is handle by ajax. I am not aware of ajax in Magento 2. Can anybody give me small demo of ajax in Magento 2 ...
0
votes
0answers
569 views

Custome scripts conflict with Magento 2 and requirejs!

I have custome jQuery scripts (revolution slider). My steps: Add custome js files to app/design/frontend/Agestor/default/web/js. Create requirejs-config.js to app/design/frontend/Vendor/default. Or ...
1
vote
1answer
421 views

To add one single validation for checkbox group and input field

I have created a custom form in magento 2. I have placed a checkbox group having different company names as checkbox values like cmpy1, cmpy2, cmpy3 etc. I have also added an input field inside that ...
2
votes
1answer
3k 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 ...
0
votes
1answer
461 views

css and Jquery loading problem in magento 2.0

I install Magento 2.0 & also install a premium themes in Live. I am working with this theme. I finished my work & my website is ready for RUN. Then I click the "flush Magento Catch" button. ...
2
votes
0answers
404 views

Magento 2 QuickSearch widget

Does anyone have any experience with Magento 2 QuickSearch widget so perhaps they can provide a code sample (how to use it in module)? I have managed to include it to my js file, but i can not figure ...
2
votes
1answer
448 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 ...
1
vote
0answers
81 views

How to replace load jquery.js form local to link web CDN in require.js

When my page load require.js required jquery.js from local https://mypage/pub/static/frontend/../../en_US/jquery/jquery.min.js And I want to change required from link web CDN https://ajax....
1
vote
1answer
552 views

Magento 2 - how to use jquery for attribute input fields which has special characters

I have three product attributes named gross_weight,stone_weight & net_weight. While entering stone_weight the net_weight should be calculated using jquery. But jquery is not recognizing input ...
3
votes
1answer
350 views

How to add an ajax reload script to a sidebar block

I am using Magento 2.1.3 and I've made a block that contains a div with an id of "tableHolder", then I added this script to my themes html head: <script type="text/javascript" src="//ajax....
5
votes
2answers
2k views

My js file is not loaded in Magento 2

My steps: 1) Load my file slider.js to: app/design/frontend/Vendorname/default/web/js. 2) Create requirejs-config.js to: app/design/frontend/Vendorname/default var config = { paths: { ...
1
vote
1answer
294 views

loader.js:41 Uncaught TypeError: url.match is not a function, When running AJAX in admin form

i have a select field set that triggered AJAX script when onchange, the ajax is calling the controller with post data, but i got an error saying loader.js:41 Uncaught TypeError: url.match is not a ...
2
votes
1answer
1k views

using jQuery-ui accordion in checkout page

I can not figure out how can i add jQuery-ui accordion to the checkout page block that this sample module, what is made by @sohelrana09, creates? .../web/template/checkout/shipping/additional-block....
1
vote
1answer
53 views

Change link jquery from local to web

This is link jquery in my local ../pub/static/frontend/../../en_US/jquery/jquery.min.js and I want change to https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js Anyone help me?
1
vote
0answers
433 views

can't get jQuery's ajaxComplete working

I can't get jQuery's ajaxComplete to work. I'm thinking it's because the ajax call is being initialised by Prototype? But how can I check when any ajax call This is basically the code I have: ...
1
vote
4answers
111k views

Uncaught TypeError: undefined is not a function when using a jQuery plugin in Magento [closed]

I am working on a Magento Extension. Magento has a known issue when you try to use jQuery in Magento because Magento uses the Prototype library. The work around for it is to put your jQuery code in ...
1
vote
2answers
303 views

Optimize revolution slider on magento home page

I have revolution slider on home page and need to optimize because on loading all the images are coming in request, So need to minimize the image request, Any one have idea how can I hide this ...
1
vote
1answer
392 views

Javascript is not working properly on product view page magento , but only for a part of the products?

i'm looking to solve a problem for few days now ! I have a website in some pages the javascript is loaded properly but in some of them not i'm getting some errors in console ! I will post an example ...
9
votes
2answers
6k views

How to create a Magento 2 Modal popup that cannot be closed?

I'm trying to create a modal popup that cannot be closed. It has a button that takes you to the next page by clicking on it, but I don't want users to be able to close it. The modal popup can be ...
1
vote
2answers
8k views

Magento 2 Modal Widget

I am trying to use Magento 2 Modal Widget like below but it was not working. It is not showing any error also. <script> require( [ 'jquery', 'Magento_Ui/js/...
1
vote
0answers
74 views

In checkout page Shipping Address and Shipping method title want to make in toggle

Where to add this jQuery code to make checkout page in shipping title and shipping method toggle. $('.step-title').on("click",function(){ $(this).parent().find('#checkout-step-...
0
votes
1answer
317 views

jQuery problem in Magento 1

Could anyone say why the below line is creating issue in My Magento 1 Web Store ? <script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/3.1.1/jquery.min.js"></script> I am ...
1
vote
1answer
773 views

requirejs load js but not work - magento 2

app/code/Vendor/Module/view/frontend/requirejs-config.js var config = { map: { '*': { 'gworks/jquery':'Vendor_Module/js/jquery.min' }, } }; In ...
0
votes
1answer
497 views

On product hover all the images from the gallery 1 by 1

I understand how to display an image based on my selection from backend for hover on the product but i am trying to display 1 by 1 sequencely with a delay For a starting point i have this code that ...
0
votes
1answer
447 views

how to reload the page everytime when user clicks button

I am building an ecommerce magento site named www.bookslab.in. I had one issue in this website. I want to make compulsory for every user to check their zipcode before they buy anything from the ...
1
vote
0answers
51 views

Uncaught TypeError: is not a conscructor after update to 1.9.3 [duplicate]

After updating from Magento 1.9.2 to 1.9.3 on my dev site the tabs on my item page broke. I looked in console for the dev site and see this error- Uncaught TypeError: Product.optionsPrice is not a ...
0
votes
0answers
32 views

Magento2 add custom jquery plugin [duplicate]

How can I add this JQuery plugin into Magento 2 store?
1
vote
1answer
590 views

Bootstrap requires JQuery Error - Loaded JQuery But have more errors

I am trying to use Bootstrap to my custom theme and followed exact instructions in https://formden.com/blog/isolate-bootstrap http://marvelcommerce.com/blog/intergrating_bootstrap_with_magento ...
2
votes
2answers
444 views

Header static block/widget with image switch on browser refresh

I have 4 season sets of images. winter-images, spring-images, summer-images and autumn-images. Every set has 5 images which has to switch on browser refresh. I want to have them in 4 separate static ...
1
vote
1answer
478 views

Ajax request from checkout page js file to controller

I want to make Ajax request to the controller from checkout page. The code I have in github and in my previous post were I did not specify that I want to make the ajax request from js file placed on ...
0
votes
1answer
351 views

Jquery conflict with elastislide.js and prototype.js

Again I am here with my nightmare Conflict issue. This question seems like a duplicate but I have read all other answer that suggests use no conflict after jquery but it's not working. Can anyone ...
2
votes
1answer
4k 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/...
1
vote
2answers
189 views

I want to refresh the page automatically if users clicks on CHECK button

I want to refresh the product page automatically if the user clicks on "CHECK" button of zipcode field. I want to refresh the page automatically every time user click on CHECK button of zipcode or ...