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
1
vote
1 answer

Mootools domready called twice

I can't seem to work out why my domready function is being called twice. window.addEvent('domready', function() { alert('Ready!!111'); } Its on a joomla 1.6 installation (mootools 1.3) with a joomlart t3 template and a couple of ja modules.…
lyndonhook
  • 11
  • 2
1
vote
2 answers

Is there a way to determine when WebView has loaded the HTML? (so when the DOM is ready)

I'd like the inject javascript into the WebView as soon as the HTML is loaded and the DOM is ready, so not waiting for the all assets. I know about onPageFinished, but it is called when everything is loaded. I'd like a callback sooner when the DOM…
Tom
  • 7,515
  • 7
  • 38
  • 54
1
vote
1 answer

How to set priority for DOM ready blocks?

I want to start getting user location if his/her settiings is active. So I check if user setting allows using GPS then I check the allow checkbox using jquery prop. $(document).ready(function(){ //using javascript I check if map settings is active…
Ali Sheikhpour
  • 10,475
  • 5
  • 41
  • 82
1
vote
1 answer

Beginner question of yepnope & jquery & modernizr

I'm absolute beginner for yepnope and modernizr. I'm trying to test some example. So my question is: when jquery loads from a 3rd party CDN. It's working fine. But when jquery loads from a local, domready function don't work? Why? Am I coding wrong…
Zeck
  • 6,433
  • 21
  • 71
  • 111
1
vote
1 answer

Migrating from YUI2 to YUI3 and domready

I want to migrate the javascript in my site from YU2 to YUI3, but I am only a poor amateur programer and I am stuck at the first pitfall. I have the following code: MyApp.Core = function() { return { init: function(e, MyAppConfig) { …
user597009
  • 51
  • 6
1
vote
1 answer

Javascript/Jquery run script after page is rendered

I am trying to make the feedback from the two functions, correct[] and wrong[], show up as the user answers the questions. I added the jQuery ready function to attempt to make everything I want appear before the prompts but without success. I have…
Erik
  • 13
  • 2
1
vote
1 answer

Is the DOM ready when a script is executed within the body tree?

I have a snipped that is placed inside ANY website, in the middle of the document like in the middle of an article, not inside . This script loads an external script on my domain by appending a