Skip to main content

Questions tagged [initialize-script]

Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

How to re init ajax add to cart inside the response in magento2

I have installed third-party module Infinite scroll for the lazy load(Lof_Ajaxscroll). The problem I am facing is Once the page loads new HTML content is generated from ajax. So add to cart is not ...
Jafar Pinjar's user avatar
  • 1,961
0 votes
1 answer
782 views

How to create auto call javascript multiple function in magento 2 in single file

I create two js file for a task. I want to merge two file task in one file in three function. Both two have different config parameter. I am using magento x init. <script type="text/x-magento-init"...
Deepak Rai's user avatar
  • 1,175
1 vote
1 answer
2k views

x-magento-init not working in magento 2

I have Need to run some script after logged in admin user in magento 2. But, Its not calling for me. What i did: I have created js file this location. app/code/Vendor/Module/view/adminhtml/web/js/...
Rajkumar .E's user avatar
  • 3,580
0 votes
1 answer
326 views

Use cases for different JS init methods

I have read a number of ways to add JS files to a Magento 2 project, but I haven't seen anywhere where the benefits / best use-cases for each are explained. The use-cases that are most relevant to my ...
Ian Rushton's user avatar
8 votes
4 answers
12k views

Need to Initialization js after ajax response magento 2

I am working on ajaxscroll product but when i got response below script not initialize <script type="text/x-magento-init"> { "[data-role=tocart-form], .form.map.checkout": {...
Prashant Valanda's user avatar