I use a top responsive nav from
https://www.w3schools.com/howto/howto_js_topnav_responsive.asp
In cakephp. I doubt JQuery has anything to do with something not working , you probably need to recheck your code for mistakes.
Cakephp being a PHP framework means if it works in PHP it will work in cakephp.
I also use laravel, and this comes up very often something in jQuery does not work in laravel.
Yet there has never been a jQuery problem or a laravel problem it’s always users syntax errors. Or the user not following an example correctly.