Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Metronic Aside menu toggle from another button


Hi,
Is there any method to toggle the aside menu from another button? I want to minimize the aside menu on some pages with function.

Thanks


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


regarding this topic I want to expand the div ID "kt_signin_email_edit" but it' dosen't seems to work.

<div data-kt-toggle="true" data-kt-toggle-state="active" data-kt-toggle-target="#kt_signin_email_edit" data-kt-toggle-name="toggle-name" class="ms-auto">
<button class="btn btn-light btn-active-light-primary">Cambiar E-mail</button>
</div>

any help?

FYI: I am using just using html code to try it.

Thanks



Hi,

You can refer to Bootstrap KTToggle API documentation here.


var toggleElement = document.querySelector("#kt_toggle_example_1");
var toggle = KTToggle.getInstance(toggleElement);
toggle.enable();
toggle.disable()
toggle.toggle();


Regards.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(