Add this line: echo "<script type='javascript'> $.noConflict(); </script>";
right under the line which is copy pasted from the cakephp book, in the default layout: echo $this->Html->script('jquery'); // Include jQuery library Good luck! On Feb 5, 9:37 am, "supp...@deep-coding.net" <supp...@deep-coding.net> wrote: > Hey, > > I'm having a problem, again :) > I want to use some jquery functions in my app, but it doesn't work, so > I tried it with a simple function (onlick alert something), but it > also doesn't work. > In my controller I've added $helpers = array('Js'); > And In my view I've added > $this->Html->script(array('jquery', 'myFunction')); > The js files will be included, I checked it in the source code. > > myFunction.js looks like this: > $(document).ready(function() { > $('myLink').click(function() { > alert("works"); > }); > > }); > > But if I click on the links, nothing happens... > Can please someone help me? > I am using Cakephp 2 and Jquery 1.7.1 > Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php