Guest User

Untitled

a guest
Sep 11th, 2015
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('.menu-button').on('click',function(){
  2. $('#menu').slideToggle();
  3.  
  4. var $submenu = $("#subMenu");
  5. if($submenu.hasClass('open')){
  6. $submenu.slideToggle(); /* I want $(this) to refer to #subMenu, but it refers to .menu-button */
  7. }
  8. });
RAW Paste Data