-2

I'm using a wordpress plugin that broke with update of jquery. Would like to fix it for myself and others since the plugin has been abandoned.

It seems this line is one of the culprits:

$nice_navigations.find("ul a").live("click", function(e, isFromLI)

I've read the documentation and tried:

$nice_navigations.on('click', 'ul a', function(e, isFromLI)) 

But I get an error. I appreciate any help.

Barmar
  • 741,623
  • 53
  • 500
  • 612
abide
  • 1
  • 2

1 Answers1

-2

Got it working with

$nice_navigations.on("click", "ul a", function(e, isFromLI)
Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
abide
  • 1
  • 2
  • 1
    That's the same code you said didn't work in the question...? – Rory McCrossan Aug 21 '20 at 19:02
  • It's not exactly the same code. Double quotes instead of single quotes made it work properly. Thank you for responding and for everyone being so helpful. Appreciate it. – abide Aug 25 '20 at 16:34
  • Double quotes and single quotes are treated the same way in JS. Changing them over will have absolutely no effect. I'm responding because this answer does not solve whatever problem was presented in the question. – Rory McCrossan Aug 25 '20 at 17:01
  • My apologies, I believe it was the additional paren on the end that I initially had. – abide Aug 25 '20 at 17:10