drupal 7 - drupal_add_js - inline doesn't execute I made a custom module and I added the following code inside the php tag and also in my hook_menu function

drupal_add_js('jQuery(document).ready(function () { alert("Hello!"); });', 'inline');


I can't figure out why it's not firing.

When I look at the 'view source' of the page
I do see this:

&lt;script type="text/javascript"&gt;
&lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!--
jQuery(document).ready(function () { alert("Hello!"); });
//--&gt;&lt;!]]&gt;
&lt;/script&gt;
Go through this document http://drupal.org/node/171213 It shows how to use Jquery. The syntax for jquery ready function is:

jquery(document).ready(function($) {
// Code that uses jQuery's $ can follow here.
});