Questions tagged [domready]

the DOMContentLoaded event, the document.readyState property, or any of a number of JavaScript plugins, utilities, and modules that handle this event and property

The term "Dom Ready" generally refers to the DOMContentLoaded event or the document.readyState property, along with a number of JavaScript plugins, utilities, and modules that handle the DOMContentLoaded event or changes to the document.readyState property.

Syntax Examples

jQuery

$(document).ready(function() {
  console.log('ready');
});

AngularJS

angular.element(document).ready(function () {
  console.log('ready');
});

ded/domready

domready(function () {
  console.log('ready');
})

MooTools

window.addEvent('domready', function() {
  console.log('ready');
});

Resources

115 questions
89
votes
7 answers

How to check if DOM is ready without a framework?

The question is so like a zillion others here and on the web - How to check if DOM has loaded in Javascript? But here's the catch: Without using a framework like jQuery etc; Without knowing if your script has been loaded via a statically placed…
Vilx-
  • 104,512
  • 87
  • 279
  • 422
36
votes
3 answers

How to know when font-face has been applied

I am currently building a corporate website for a customer that uses custom fonts extensively. On jQuerys DOM-ready I am doing placement calculations to figure out where some pop-up menus with dynamic width and height should be placed based on their…
Martin Jespersen
  • 25,743
  • 8
  • 56
  • 68
33
votes
7 answers

javascript:how to write $(document).ready like event without jquery

in jquery $(document).ready(function) or $(function) , how could I do the same thing without jquery, and I need browser compatiable, and allow to attach more than one function. Note: dom ready!= window onload
guilin 桂林
  • 17,050
  • 29
  • 92
  • 146
32
votes
4 answers

Why is jQuery.ready recommended when it’s so slow?

I have asked a similar question before but I never made my point exactly clear, or at least I think it’s such a relevant question that it’s worth to bring it up and see if anyone can give some insightful thoughts. When using jQuery, many of us use…
David Hellsing
  • 106,495
  • 44
  • 176
  • 212
23
votes
4 answers

What is the DOM ready event?

I need to fire a script as soon as the page content (the whole HTML element) has been received, but it doesn't have to be rendered yet. I assume that just having a simple
user1643156
  • 4,407
  • 10
  • 36
  • 59
1
2 3 4 5 6 7 8