How to check that this event would occur after DOM is ready in jquery?
<p>I want to get page_tag information from the page and want to make sure that DOM for this page is already ready before getting the page tag information. </p>

<p>I am doing </p>

<pre><code>$(document).ready(
{
   alert("test");
   var page_tag : $("head meta[name='page_tag']").attr('content');
   page_tag : (page_tag) ? page_tag : '';
}
</code></pre>

<p>But it gives me errors, </p>

<pre><code>missing : after property id
alert("Check if document is ready");\n
</code></pre>

<p>Any suggestions on what could be the possible reasons for it or any other way of checking if the dom is ready or not before getting page_tag information. </p>
