Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
128
rated 0 times [  134] [ 6]  / answers: 1 / hits: 91349  / 13 Years ago, thu, august 25, 2011, 12:00:00

I want to call function before document get ready, so is there any method in Jquery to do this?


More From » jquery

 Answers
1

If you simply call a function in the head tag it will execute immediately, before the DOM is even parsed (that's the 'problem' that ready solves).



<!doctype html>
<html>
<head>
<script>alert(1)</script>
</head>
<body>
</body>
</html>

[#90424] Wednesday, August 24, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mira

Total Points: 460
Total Questions: 108
Total Answers: 99

Location: American Samoa
Member since Fri, Aug 26, 2022
2 Years ago
mira questions
;