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
0
votes
3 answers

Delay execution of addThis

I have a website that uses google maps plus my own javascript. I am using the addThis javascript for social buttons. The site isnt really usable until my javascript plus the google javascript loads and runs (on $(document).ready...) so I want to…
spiderplant0
  • 3,872
  • 12
  • 52
  • 91
0
votes
2 answers

Get image dimension after page load

I have a project that needs to get the logo's dimension and adjust its position accordingly. From what I understand, all the elements on the page should be ready for use right after $(document).ready or onload event. I also tried to put the script…
0
votes
1 answer

Get body before domready?

something I hope this code may return a classname of the body. But instead, I get Uncaught TypeError: Cannot read property 'className' of null Is there…
John Rake
  • 13
  • 3
0
votes
1 answer

Load timeout for module: domReady!_unnormalized2

How do you interpret this error? Uncaught Error: Load timeout for modules: domReady!_unnormalized2,domReady!_unnormalized3,domReady! I'm using requirejs 2.1.2 and domReady 2.0.1. It doesn't happen always, and apparently only in Chrome (in IE…
pomber
  • 23,132
  • 10
  • 81
  • 94
0
votes
2 answers

domready event and iframes

If I do... Ext.onReady(function(){alert('Ready');}) or... jQuery(document).ready(function(){alert('Ready');}) ...and if I have an iframe on the page I'm running this on, the functions don't run until after the iframe has loaded its content. This…
dublxdad
  • 153
  • 1
  • 12
0
votes
4 answers

How to get .ready to be called each time an element is loaded in jQuery?

I'd like to have an event that fires every time a Dom element is initialized, like so: HTML
data!
Click me!
​ Javascript $(function() { var i = 0; …
Benjamin Crouzier
  • 40,265
  • 44
  • 171
  • 236
0
votes
1 answer

Why is the JQuery .ready function sometimes not waiting for DOM?

I'm using JQuery to setup some comboboxes and I've wrapped the .combobox calls in the .ready function to make sure my controls are available, but on every 10th or so time loading the page, the elements used for the comboboxes are not in the DOM.…
johntrepreneur
  • 4,514
  • 6
  • 39
  • 52
-1
votes
2 answers

Document ready function - Not loading the code first

I have a function that works on the body onload="" but I need it to load before other elements of the page and I'm trying to add the document ready function in the header but it just doesn't seem to work. f1menu() { $('.menuH').hover( …
brigitte18
  • 145
  • 3
  • 16
-1
votes
1 answer

displaying a dynamic background image within a google maps infobox on infobox.open

I am trying to add a background image to a div that is within the content of a google maps infobox. I'm running into problems because the function that I'm using to change the .css('background-image') is not recognizing the div's ID. This is…
stokexx
  • 77
  • 2
  • 10
-2
votes
2 answers

What are means of domready, onload, body, head?

I have doubts on the domready, onload, body, head. when i am linking some js into head, it's not working. otherwise, its working in the body. And i have noticed in the JSFIDDLE, it mentiond. What are means fo this and differnce? Could you please…
Darious
  • 121
  • 1
  • 13
1 2 3 4 5 6 7
8