Magento Expert Forum - Improve your Magento experience

Results 1 to 7 of 7

Use Custom JavaScript in Magento 2

  1. #1
    [ Contributor ] Wajid Hussain's Avatar
    Join Date
    Nov 2014
    Posts
    204
    Thanks
    3
    Thanked 14 Times in 12 Posts

    Default Use Custom JavaScript in Magento 2


  2. The Following User Says Thank You to Wajid Hussain For This Useful Post:

    ClickPoint (18-04-2016)

  3. #2
    Junior Member ClickPoint's Avatar
    Join Date
    Mar 2016
    Location
    Bangalore, India
    Posts
    18
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Awesome! I read the article, the writ was nicely published. I was suffering website load speed, now my website is drastically increased. Very much helpful for the ecoommerce website development services.
    Thanks

  4. #3
    Junior Member
    Join Date
    Sep 2016
    Posts
    228
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    magento is the best choice for e-commerce website , magento provide automated css and javascript and jquery library ......


    Best Teeth Whitening in Delhi | Cosmetic Dental Treatment in Delhi
    Last edited by vishnu; 24-11-2020 at 12:19 PM.

  5. #4
    Junior Member
    Join Date
    Aug 2018
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Can i use a javascript to hide some elements on my Magento 2 site pages. I want to display only a few attributes of the products and hide rest of the content on the page, to give my website a minimalist design.

    What's your suggestion for me?




    -------------------------------------------------------------------------
    https://www.netguru.co/services/react-js

  6. #5
    Junior Member
    Join Date
    Sep 2018
    Location
    United Kingdom
    Posts
    635
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    You will notice that the javascript code on the top user “define” function.
    This function is from requireJs – first parameter of “define” function is array of dependency and second parameter is definition of our function.at that point it incorporates the record,your record is got incorporated into your .html document, and after that you can utilize the information, which is passed in this document

  7. #6
    Junior Member
    Join Date
    Sep 2018
    Location
    United Kingdom
    Posts
    228
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    To include js record in your magento 2 custom module, you have to include "requirejs-config.js" document in your module at way "application/code/Webkul/Test/see/frontend". }; In this : by the guide, it maps your record with the assumed name which you characterized in the article.

  8. #7

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •