Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jquery]

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

0
votes
0answers
98 views

Js error when first time loading site magento 2 in chrome browser

Js error when first time loading site magento 2 in chrome browser. Firefox, and explorer no problem. One of the problem is here. http://prntscr.com/kso59y
1
vote
1answer
495 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/...
0
votes
2answers
55 views

Jquery function call issue Magento 2

I am attempting to create a basic text slider, which works perfectly well on a plain html page. However, when I move it to my Magento 2 site, I get an undefined error for this piece of javascript. ...
4
votes
2answers
460 views

Magento 2 : How to call text/x-magento-init on Ajax success

I am in need to trigger some script with "text/x-magento-init" on ajax call but I am unable to do so. trigger('contentUpdated') contentUpdated is also not working in my case. I am using ...
1
vote
1answer
650 views

Magento 2 How to set value to UI component hidden field using Jquery or Javascript

I want to fill value in to ui component hidden field using Jquery or Javascript. Below is my code. Namespace/Modulename/view/adminhtml/ui_component/sampleimageuploader_image_form.xml <field ...
0
votes
2answers
215 views

How to use third party jquery libraries in magento along with requirejs?

I am bit new to requirejs and currently learning AMD pattern in requirejs.I want to use custom third-party jquery libraries in magento. I have two questions: How to use jquery scripts that are ...
1
vote
0answers
65 views

Insert textbox value in magento database [closed]

I am new to Magento. I am trying to insert Textbox value into database on button click. I am using this code for calling controller function. <script type="text/javascript"> jQuery( function() ...
0
votes
0answers
110 views

Admin forgot password js issue

I have Try to solve bellow js issue but not succeed. i have checked in new magento this file is magento inbuilt merge. Can any one have solution how to solve this issue ?
1
vote
1answer
45 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
1answer
187 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)....
0
votes
1answer
46 views

How get Parent child div valule

want to get <span class="price">Rs.5,190.00</span> using jquery, below is html <div id="checkout-review" class="onepagecheckout_block"> <div class="op_block_title"><i ...
0
votes
2answers
345 views

Magento admin form date widget week number differs from jquery UI week number

For a project I am working on we need to know the week number which is displayed via a date form field widget in the admin section. On the front end we also show the week number but we are using a ...
0
votes
1answer
272 views

Change Product Page Fotorama On Element Click

I'm trying to change to a specific image in the product gallery when the user clicks a button to customize their item. So far I have the following code: require( ['jquery', 'jquery/ui', 'mage/...
2
votes
1answer
261 views

Magento 2 TypeError Undefined products images not displaying / js not loading

At home page, product category view and product detailed view page images are not loading / displaying at firefox and less frequently at chrome. I am using magento 2.2.6 upgraded from 2.2.2 and porto ...
2
votes
1answer
211 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: ...
0
votes
0answers
63 views

Magento 2 How to set dropdown attribute value on product page using JS Frontend

Please see the attached screenshot: Here, How can I set the value of SIZE while loading page? Do we have to initialize any configurable swatches option JS? Please suggest & guide me if you face ...
0
votes
1answer
316 views

Magento 2 How to add custom validation rules and apply them?

I'm trying to modify some validation rules for the State input in shipping address. I want to add an error message if user selects 'Texas'. I created a mixin for Magento_Ui/js/lib/validation/rules in ...
0
votes
1answer
57 views

How can scroll screen to clicked div in mobile view

Open link in mobile or in >600px device : http://dev.mpex.com/ee14/team-2018 Click on any team image. after open description cursor goes to top. we need to keep on clicked image. when I click to this ...
0
votes
2answers
230 views

jQuery multiple input types in one form

I got multiple input types in my form based on positions. <input type="file" name="file" id="file" data-positionid="<?php echo $positionId; ?>" class="inputfile" /> Now i want on change ...
1
vote
0answers
46 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 ...
0
votes
1answer
46 views

using javascript in .html form Magento2

i have a custom form.html that displays at checkout. i want to have a javascript tag - when the form load just show an alert testing purposes. code i used below, "<script type="text/javascript"&...
1
vote
1answer
229 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', ...
0
votes
1answer
61 views
3
votes
0answers
1k views

Website not functioning correctly, when clicking onto for example checkout [closed]

I have a website gsstickerman.co.uk But when you click onto checkout for example, nothing happens. Before it came up with the checkout box. I looked in the java console "Uncaught TypeError: Cannot ...
4
votes
0answers
98 views

Knockout.js in magento2

How to change the jquery into ko? define([ 'jquery' ], function ($) { "use strict"; $.widget('xxx.homePage', { options: { bindSubmit: true, ...
2
votes
0answers
33 views

Need to Initialization js while ajax response magento 2

Need to Initialization js for particular div when the div append ajax response magento 2. i have append the div in ajax response and also i need initialize js for that div. How to do that
0
votes
1answer
31 views

home page in magento2

I have created home.js file using require-config.js for HomePage. And init that home.js file in home.phtml file for Home Page. But i need to get the function that inside the home.js file into size....
0
votes
1answer
17 views

How to add a custom jquery file for custom shipping additional file in magento 2

I have created a custom shipping method + shipping form like below. I want to add click event for the check box. I tried this code in my phtml file. <script> require( [ 'jquery', ...
6
votes
4answers
12k views

how to implement Loader widget in magento2

I want to implement loader widget in magento 2, In my form i have placed one button <div style="display:inline; float:right; width:100%; margin-bottom:5px;"> <button style="" class="...
0
votes
1answer
222 views

Magento 2 - Is there a way to change element “data-mage-init” without overriding a template?

For example I want to change some options of minicart dialog initialization. So I need to change minicart template (override this template in custom theme/module). Is there a way to change minicart ...
5
votes
2answers
6k views

How to add js libraries that require Jquery to magento 2 using requireJs

I am having a bit of strange behaviour with Magento 2 require. What I trying to do is to use glide.js to load carousel image. I create custom.js and here is my code. require(['jquery', 'lib/glide'], ...
12
votes
2answers
12k views

How to add bootstrap.js in magento2

I m trying to include bootstrap js on my magento2 theme. But the problem is when i include bootstrap js on my theme. That time console is giving error that bootstrap require jQuery. Then how can i ...
0
votes
0answers
193 views

jquery ajax not working in magento2

I am working on a simple custom module, where user can input height and the weight/BMI will be shown as output on form submit. The page where user enters input is Calculation Page while output is ...
1
vote
0answers
45 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, ...
3
votes
1answer
5k views

Magento 2: How to add popup on button click in admin?

Can you explain how to add popup(modal window) on button click in the adminhtml? I already create some phtml <div id="messages"> <div class="messages"> <?php foreach ($this->...
0
votes
2answers
445 views

Displaying a message when hover on a readonly attribute!

I'm trying to display message on hover over a readonly select in a product page, ( Magento 2.2.4, Php 7) Here's my attempt: CSS: #select_801[readonly]{ background: #eee; pointer-events: none; ...
2
votes
2answers
362 views

Open Tab on page load in magento 2

I have code like below in my html file <div class="payment-option _collapsible opc-payment-additional discount-code" data-bind="mageInit: {'collapsible':{'openedState': '_active'}}"> ...
1
vote
1answer
132 views

RequireJs and Custom JS file blur

this is my simple requirejs-config.js file var config = { deps: ['js/custom'] }; and this is my custom.js file define([ "jquery", "domReady!" ], function($) { "use ...
0
votes
0answers
212 views

How to solve jquery issues in Magento 2?

I am using Magento 2.2.3 and I have created customtheme But in my website scripts are not working properly.It gives me below error: ReferenceError: jQuery is not defined I have added requirejs-...
0
votes
1answer
3k views

Is there any other way to call data-mage-init?

On AJAX I want to display the Buy Now button. For that, I created one variable var buy_now_button = '<span title="<?php echo __('Buy Now') ?>" id="buy-now" class="action buynow primary" ...
3
votes
0answers
731 views

mageInit KO binding not working for a custom jQuery widget

I can't get the mageInit binding to work on a custom jQuery widget which I have created. I have used it in my KO template like: <div data-bind="mageInit: {'mywidget':{'configuration-value':true}"&...
0
votes
2answers
412 views

Owl Carousel not working in Chrome

I've got a carousel (Owl Carousel) on my home page that doesn't work on Chrome but does work in other browsers. I believe it is something to do with Jquey loading after the carousel but I'm not 100%. ...
3
votes
0answers
36 views

Magento2 - Remove/edit classes from navigation

i have set up a new magento2 store and i added some jqery-ui items ( accordion and tabs) and for them to work, i included the jquery.css in my _extend.less inside my custom theme. Unfortunately now ...
1
vote
1answer
203 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 ...
0
votes
0answers
40 views

Magento 2 adding textbox to modal widget

I want a text box in my modal widget in custom js file and get the value of that text box on button click of that modal. require([ 'jquery', 'jquery/ui', 'Magento_Ui/js/modal/modal' ], ...
2
votes
3answers
3k views

How to add a jQuery plugin in theme?

I have been looking into RequireJS for a while, but till now, I still can not figure out how to add the TouchSwipe plugin into my theme. Would somebody take the time to give me a step by step?
0
votes
1answer
83 views

Magento 1.7 custom options not updating price

On a Magento 1.7 website the product option price is not longer updating the main price. I updated the prototype.js file which I though was causing the issue but still no luck. When I inspect the code ...
0
votes
2answers
1k views

jQuery conflict in owlcarousel

I am trying to include the Owl Carousel slider in my Magento 1 Store Home Page. But the line <script src="http://www.owlcarousel.owlgraphic.com/assets/vendors/jquery.min.js"></script> is ...
0
votes
1answer
20 views

JQuery message im magento 1, need to be adjusted for non-repetition and translation-ready

I have two issues in this code: 1: if I keep clicking on the radio button the message will be repeated. 2: I cannot translate the message to other language. Here is my jquery code: <script ...
24
votes
3answers
38k views

How to use jquery library in Magento 2?

I am creating a Magento theme where I need to include jQuery. When I add this <link src="js/jquery-1.7.1.js"/> in head. It is working but Magento javascript functions are not working. How to ...