Tell me more ×  I've just started to learn jquery and i'm stuck
on a certain part, i'm not even sure it's possible as I can't
find any answers.  Basically i'm trying to create an if else
statement. here's the code I have so far, I know it won't work
but i hopefully it gives you an idea of what i'm trying to
achieve.  if (('.menu').on('click', 'li has:(sub-menu)',
function(e))) { else {     let link work like normal  Here's a
fiddle of what i'm trying to achieve.  I can't seem to get the
back button working or the final link to it's default.
share|improve this question Appreciate your learning desire but
posting only code doesn't give clear idea, infact your code is
not ideal, always post what you are trying to achieve. –  Dhaval
Marthak Oct 17 at 9:40 add comment  1 Answer  Do it like this.
Pseudocode:  else {   return true; share|improve this answer I'v
just updated my code (see above) but there's still an issue,
check out the fiddle above. Dan –  Dan Oct 17 at 11:22 add
comment  Your Answer