index.js 631 B

1234567891011121314151617181920212223
  1. function showSubnav() {
  2. $(this).addClass('open');
  3. $('.m-sub-menu').addClass('left1');
  4. $('.all_wrap,.m_header').addClass('left1');
  5. }
  6. function hideSubnav() {
  7. $('.m-sub-menu').removeClass('left1');
  8. $('.all_wrap,.m_header').removeClass('left1');
  9. }
  10. $('.navh').on("click", function () {
  11. var _this = $(this);
  12. var that = $('.navh').parent('li');
  13. if (_this.hasClass('open')) {
  14. _this.removeClass('open');
  15. _this.next('dl').stop(true, true).slideUp();
  16. } else {
  17. that.find('.navh').removeClass('open');
  18. _this.addClass('open');
  19. that.find('dl').stop(true, true).slideUp();
  20. _this.next('dl').stop(true, true).slideDown();
  21. }
  22. })