I need to change my Java script code to jquery widget.Please provvide me a solution

js file

        function ($) {
            "use strict";

            var popup = {
                type: 'slide',
                responsive: true,
                innerScroll: false,
                buttons: false,

                modalClass: "bottom-side-popup",
                clickableOverlay: true


            var popupmodel = $('#wrapper').modal(popup);
            $(".products-btn").click(function () {



                slidesToShow: 8,
                slidesToScroll: 1



Use 'define' instead of 'require' if want to use in JS file:

  <script type="text/javascript">
      /** This is demo for how you can use it in .phtml files**/
          function($,modal) {
              var options = {
                  type: 'slide', // or popup
                  responsive: true,
                  innerScroll: true,
                  modalClass: 'add-modal-class'
              var popup = modal(options, $('#id-of-content-div'));


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.