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
2 answers

get length of angular js ng-repeat li listing items with jquery

I am making ul-li list using angular ng-repeat. But on DOMReady i want total length of that list that has been generated and i want to run an event on that li on "hover" or "click". But the length iam getting is 0 and no event is firing. What can…
worlock
  • 190
  • 1
  • 18
0
votes
2 answers

Is it possible to respond to elements being added to the DOM before the document load event is fired in Javascript?

I'm trying to make a javascript embed that will manipulate the page as it loads. The script is in the header, and I want it to be able to manipulate an element as soon as it can be found by document.querySelector. In other words, it needs to react…
Spevak
  • 55
  • 5
0
votes
2 answers

Show jQuery loading progress before page fully loaded

I am using requireJS domReady plug in to show jQuery loading progress on asp.net web page. Here is the code that I am using, require(['domReady'], function (domReady) { domReady(function () { //Hide jQuery loading progress }); //Show…
CoolArchTek
  • 3,729
  • 12
  • 47
  • 76
0
votes
2 answers

jQuery without domready

Searching for a way to add this code, after the (or some ) and before is generated (created). $('body').append(''); There is no …
Happy
  • 881
  • 7
  • 16
  • 32
0
votes
1 answer

Google Analytics and DOM ready

There are a few events that are fired when certain resources have finished loading, such as https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded and https://developer.mozilla.org/en-US/docs/Web/Events/load I was wondering whether or…
bernland
  • 688
  • 8
  • 16
0
votes
2 answers

jQuery's Event for "all images loaded" after dom is modified

I have a mobile page where the contents (of pages) will loaded via ajax. I'm using iScroll and I have to reinitialize it, when the content will refreshed. iScroll needs the height of the tag. And when the loaded content has to many images, i have a…
AppGeer
  • 725
  • 1
  • 11
  • 27
0
votes
1 answer

Jquery assign new property, based on another

In my $().ready() area, I want to add a property to an object, based on another property of it. it should be done before any event on the object. e.g: $().ready(function(){ $("input").newProp = ??? }); How can it be done?
yossi
  • 3,090
  • 7
  • 45
  • 65
0
votes
0 answers

Error with requirejs domReady

I am using the requirejs domReady plugin within my code like this: 1.Config for module: requirejs.config({ baseUrl:'scripts', paths:{ async:'lib/plugins/async', domReady:'lib/plugins/domReady' } }); 2.Actual module …
vamsiampolu
  • 6,328
  • 19
  • 82
  • 183
0
votes
1 answer

RequireJS loading ansynchronously... how to guarantee ondomready event?

'It is possible when using RequireJS to load scripts quickly enough that they complete before the DOM is ready.' Well wait. What if the script is big and actually does not get loaded until AFTER the domloaded event in the browser? waiting for the…
Toskan
  • 13,911
  • 14
  • 95
  • 185
0
votes
1 answer

How modify an angular element, as a ng-repeat element, by jQuery?

I think the problem is that angular creates these elements with javascript, so after the jQuery domready. So jQuery doesn't see those elements into the DOM. What can i do? HTML
  • Donovant
    • 3,091
    • 8
    • 40
    • 68
  • 0
    votes
    1 answer

    Ember app kit Application view didInsertElement fired only once

    Hi I use Ember app kit and I need to fire a didInsertElement every time I changed route(child view - view in outlet). I need something like global app DOM ready event. I found mavilein's solution but it doesnt work. Here is my…
    petkopalko
    • 600
    • 7
    • 18
    0
    votes
    1 answer

    Can't call repetitive js from external file?

    I have a website here. I have this script that calls the appropriate functions for the Sticky Notes to work... //Functionality for Sticky Notes $(function() { $("#content").stickynote({ size : 'large', …
    Millhorn
    • 2,953
    • 7
    • 39
    • 77
    0
    votes
    2 answers

    jquery function firing early

    In my script, the function in question is at the end of $(jquery).ready(function(){...}); For some reason it is firing before the DOM is loaded. I'll post the whole script below. I am interested in what happens at lines 246-248. THIS IS THE BUGGY…
    eightArmCode
    • 175
    • 1
    • 4
    • 15
    0
    votes
    2 answers

    Get text td Xpath PHP

    I am getting tr of tables and then in loop i want get text of all td fields, look here: query("//table[@id='cab_table'] //tr"); var_dump($lines);// Give me object(DOMNodeList)#11 (1) { ["length"]=> int(6) } …
    user2565968
    0
    votes
    1 answer

    Provide Public Access to Default Plugin Settings: jquery plugin does not work unless move it to the end of the element?

    I don't understand why I get two different results below. I use the most conventional jquery plugin pattern for Provide Public Access to Default Plugin Settings, $.fn[pluginName].defaults = { property: "value", ... } But I can't get the…
    Run
    • 54,938
    • 169
    • 450
    • 748