echoing a jquery animation function with php -


i trying echo jquery function, php. if script detects field of form not filled in echo , make input text box turn red.

it works fine when not being echo'd.

echo(' <script type="text/javascript">     $(document).ready(function() {          $(\'input\').animate({backgroundcolor:\"#f00\"},200);     }); </script> '); 

any ideas?

i don't think have escape quotes when string within single quotes. php won't parse string, output literally.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -