Fields in CakePHP could not be referred by JQuery

Posted by kwokwai on Stack Overflow See other posts from Stack Overflow or by kwokwai
Published on 2010-05-16T18:33:06Z Indexed on 2010/05/16 18:40 UTC
Read the original article Hit count: 138

Filed under:

Hi all,

I have got a simple HTMl form with one field as follows:

<input type="text" name="data['User']['user_id']" id="data['User']['user_id']" value="1"> 


$(document).ready(function(){
$("#data['User']['user_id']").mouseover(function(){
alert("hello");
});

});

The code couldn't work,
I think it may be the name of the Input text field that caused the problem,
but I don't know how to alter it
because this is the naming convention in CakePHP.

© Stack Overflow or respective owner

Related posts about cakephp