mm-event.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. $(function() {
  2. $('#menu').metisMenu().on('show.metisMenu', function(event) {
  3. new Noty({
  4. text: $(event.target).parent('li').children('a').html() + ' opening ...',
  5. layout: 'topRight',
  6. type: 'information',
  7. theme: 'relax',
  8. timeout: 350
  9. }).show();
  10. }).on('shown.metisMenu', function(event) {
  11. new Noty({
  12. text: $(event.target).parent('li').children('a').html() + ' opened',
  13. layout: 'topRight',
  14. type: 'success',
  15. theme: 'relax',
  16. timeout: 350
  17. }).show();
  18. }).on('hide.metisMenu', function(event) {
  19. new Noty({
  20. text: $(event.target).parent('li').children('a').html() + ' collapsing ...',
  21. layout: 'topRight',
  22. type: 'warning',
  23. theme: 'relax',
  24. timeout: 350
  25. }).show();
  26. }).on('hidden.metisMenu', function(event) {
  27. new Noty({
  28. text: $(event.target).parent('li').children('a').html() + ' collapsed',
  29. layout: 'topRight',
  30. type: 'error',
  31. theme: 'relax',
  32. timeout: 350
  33. }).show();
  34. });
  35. });