How to check that this event would occur after DOM is ready in jquery ?
Posted
by Rachel
on Stack Overflow
See other posts from Stack Overflow
or by Rachel
Published on 2010-04-29T20:34:33Z
Indexed on
2010/04/29
20:37 UTC
Read the original article
Hit count: 162
jQuery
|JavaScript
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.
I am doing
$(document).ready(
{
alert("test");
var page_tag : $("head meta[name='page_tag']").attr('content');
page_tag : (page_tag) ? page_tag : '';
}
But it gives me errors,
missing : after property id
alert("Check if document is ready");\n
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.
© Stack Overflow or respective owner