M
M
MaximMRX2018-03-04 14:59:23
JavaScript
MaximMRX, 2018-03-04 14:59:23

Call mmenu multiple times with the same settings?

Good day. Called mmenu with pupup settings. 5 forms, the settings are the same. How to initialize 1 time but immediately all the forms I need?
Now I’m calling like this .. Trying to specify it with a comma does not work ..

$("#name1").mmenu({
    "extensions": [
      "pagedim-black",
      "popup",
      "theme-white"
    ],
    navbar: {
      title: false
    },
    navbars: {
      content : []
    },
    "autoHeight": true
  });
("#name2").mmenu({
    "extensions": [
      "pagedim-black",
      "popup",
      "theme-white"
    ],
    navbar: {
      title: false
    },
    navbars: {
      content : []
    },
    "autoHeight": true
  });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaximMRX, 2018-03-10
@GM_pAnda

It turned out to be easy :)

$("#name1, #name2").each(function(){
  $(this).mmenu({
    "extensions": [
      "pagedim-black",
      "popup",
      "theme-white"
    ],
    navbar: {
      title: false
    },
    navbars: {
      content : []
    },
    "autoHeight": true
  });
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question