Your selector for myLink in js is not correct...

Dne nedelja, 05. februar 2012 je poĊĦiljatelj supp...@deep-coding.net <
supp...@deep-coding.net> napisal:
> 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
>

-- 
--
Lep pozdrav, Tilen Majerle
http://majerle.eu

-- 
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

Reply via email to