I have the following script inside my master page :-
<script type= "application/javascript">
document.getElementById("currentdate").innerHTML = EMBEDformatAMPM();
var myVar=setInterval(function(){myTimer()},30000);
function myTimer()
{
document.getElementById("currentdate").innerHTML = EMBEDformatAMPM();
}
//code goes here
}</script>
but the problem i am facing is that the script will run before the (currentdate").innerHTML
loads, and the script will raise a null reference exception, so my question is basically about how i can force the javaScript to run after the page loads.?
Thanks
EDIT
My jQuery file is raising the following error ,, not sure why :-
Error: Syntax error, unrecognized expression: unsupported pseudo: visited