Advertisement
dimitriskl

Menu Attempt

Aug 4th, 2022 (edited)
778
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('.menu-item-has-children > a').on('click', function(){
  2.     // Stop default behaviour
  3.     e.preventDefault()
  4.  
  5.     // Find the correct element to be clicked and click it manually
  6.     this_clicked = $(this)
  7.     siblingDropdownIcon = this_clicked.siblings('span').first()
  8.     siblingDropdownIcon.click()
  9. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement