Questions tagged [ready]

a HTML DOM JS function indicating the document may be manipulated

ready
Filter by
Sorted by
Tagged with
1 vote
0 answers
763 views

Bootstrap modal not showing on page reload with specific url parameters

I am trying to automatically show a bootstrap modal which needs to open on page load. The first time the page is loaded it works. If the regular <a> element to open the modal is clicked, a small ...
0 votes
0 answers
29 views

Why is this simple ready() Javascript code not running inside the <body> HTML? [duplicate]

Inside my <body> HTML tags, I have the following test code: <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"> $(document).ready(...
0 votes
2 answers
41 views

Use filter on not already loaded elements

I use this script Jquery to show only one category of a list hidden by css: <script language="javascript"> $(document).ready(function(){ $('span') .filter(function(){ return $(this)....
7 votes
3 answers
17k views

Is $(document).ready() called after loading all script files in the body? [duplicate]

Is $(document).ready() called after loading script js files in the body ? If I put $(document).ready() in the head in script element which take a callback function that using a functions declared in ...
-3 votes
2 answers
14k views

jQuery Document Ready Function not Working [closed]

I've been trying to get a page to open a lightwindow when it's done loading using jQuery's document.ready function and I cannot figure out why it won't work... <!DOCTYPE html PUBLIC "-//W3C//...
-8 votes
1 answer
72 views

Button click not fire in javascript

This is my code "btnviewreport1" is not fire after page load <script type="text/javascript"> $(document).ready(function () { var hfDoYouWantPrint = document.getElementById('<%= ...
0 votes
1 answer
214 views

.ready() method of jQuery for handling spinner

I am trying to have a spinner shown while div's background image is loading: var div = $("<div class='spinner' id="+this.room.views[this.currentIndex].domID+"></div>"); div....
2 votes
2 answers
714 views

How to mock jquery ready function

Due to certain reason, we are going to remove jquery from our legacy app (Please don't ask why!) However, there 1000+ of template files by designers, are making used of jquery ready function. We plan ...
0 votes
1 answer
123 views

jQuery script run on (document).ready AND $(window).resize

I'm javascript/jQuery clueless! I have a script that is invoked with jQuery(document).ready which works great, I also want the script to update itself when the window is resized. The script is called ...
0 votes
1 answer
73 views

How to reference $(this) with .ready()

I'm working with Tumblr documentation to make it so when the page theme loads a certain post (ask posts in this case), it appends the html of that post into a separate fixed div that acts like a "...
0 votes
2 answers
463 views

Replacement in 1.9 for Socket's ready? method

For some time I have been using an old Ruby distribution (I think it was 1.8.6) on which I coded with the socket library. The old library had a method called ready?, which checked whether there was ...
27 votes
2 answers
26k views

window.onload vs document.ready jQuery

I have a site with two columns. I want to have equal height on both using jQuery. I'm trying to get the logo column height. I had: $(document).ready(function() { alert($('#logo').height()); });​...
0 votes
0 answers
154 views

Why is my ready function not reached?

I am trying to reset a cookie's val to "1" every time in the ready function, however it seems as if my ready function is not getting reached at all. First, I got the following code to get and set ...
0 votes
3 answers
10k views

Jquery .scrollTop() and .scrollLeft() on $(document).ready() not working

I'm having a problem with scrollTop() and scrollLeft() on $(document).ready() I want to to move to centre square on load. I wrote this code, but its not working. Here is my code: <!DOCTYPE html&...
3 votes
7 answers
11k views

jQuery .ready() for infopath form?

I have an infopath form that I want to modify via jQuery. The only problem is that it loads after the pages DOM loads, so jQuery's standard $(document).ready(handler); won't work here. My question is ...
1 vote
1 answer
142 views

$ionicDevice.ready() does not fire when building on linux

I've been struggling wit this few days now and just can't work it out. This is my .run part in app.js file located in the www/js/ folder: angular.module('starter', ['ionic', 'starter.controllers', '...
0 votes
1 answer
2k views

$(document).ready and jQuery(function($) not working; jQuery is defined, but script isn't entering .ready function

EDIT: Here is the full HTML. It was too long for me to paste directly here. I didn't create this page, I just have to clean up the problems with it. I'm trying to run a function from inside $(...
1 vote
4 answers
17k views

How to check if javascript function is ready/done (jQuery)

I am working on a learning planner which gets its data (languagekeys, tasks, activities, etc.) from a database. Because I need a JSON string, I encode it with json_encode to work with it in JavaScript....
0 votes
1 answer
57 views

jquery trigger works from click but no in on ready

I have some checkboxes which trigger an ajax search. I want to check the boxes automatically and trigger the search. If I run the triggers from a button click, it works fine. But if I add them to the ...
0 votes
2 answers
957 views

Javascript or Jquery: Write html to iframe not fire $(document).ready in IE

This is my situation. The main page: <script type="text/javascript"> function load_frm() { if($.browser.msie == true) { var frame = document.getElementById('...
-1 votes
1 answer
54 views

fadeslideshow jquery ready conflict

When we add fadslideshow to our home page our category boxes display different. Correct display of our category boxes(scroll down page to see the category boxes) https://pretty.alkoncgi.mobi/index-3....
0 votes
0 answers
112 views

execute code after link is loaded

There is an anchor tag with a link. So when I click on the link and all the new content loads I want to execute one line of code which opens the desired slide from slider. Is there an event for this? ...
6 votes
4 answers
30k views

jquery binding events to dynamically loaded html elements

using jquery we can attach event handlers to the elements present in page, this is done inside document.ready() function. Now my difficulty is i have some elements like links etc loaded later (using ...
7 votes
4 answers
10k views

BufferedReader never ready (Socket programming in Java)

I have socket already declared socket like this: serverAddr = InetAddress.getByName(this.ip); socket = new Socket(serverAddr, port); out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(...
1 vote
0 answers
80 views

Is there a way to know when the DOM of a partial view is ready after it is inserted into the DOM of your web page?

I'm writing an application using Knockout. I have subviews I'm inserting via jQuery's append() function. I'm using the text plugin for RequireJS to dynamically retrieve the HTML, then I'm using append(...
1 vote
1 answer
285 views

jQuery function only applied after refresh

I'm using $.getJSON(...) to load JSON data (images) to my HTML web page, the getJSON() function gets called when the DOM is ready: $(document).ready(function() { After that I use the montage.js ...
1 vote
1 answer
2k views

jQuery function works in console but not in code

The code below creates a search field and then attaches a focus event to it so the preset value disappears when users click in the input field. The .focus line works in the console but not in the ...
4 votes
2 answers
4k views

$(document).ready() firing immediately within a jQuery-AJAX call

I have an html page called search.html that contains the following jQuery code : $(document).ready(function(){ ...some code // THIS IS THE CODE I'M INTERESTED IN } ...some other code And I have ...
1 vote
0 answers
104 views

Moving from document ready to js file class/object

I was doing a lot of mocking of a layout page. I wrote lots of javascript using $(document).ready in the header to test. $(document).ready(function () { $('.errorPopup').hide(); $('#account')....
2 votes
3 answers
4k views

$(document).ready(function() {...}) runs before plugin script loads

I'm getting a JS error because my $(function () {...}) handler is being fired seemingly before the prerequisite plugin script is loaded. Only happens in IE (testing in IE7). I have some HTML in my &...
0 votes
1 answer
837 views

Javascript/jQuery - repeat check for 5 iterations & run another function if condition is met

I'm having an implementation issue running a script. The outcome I am trying to achieve is as follows. The script should run by clicking hi_button on the website, wait until btc_digits has finished ...
-1 votes
1 answer
330 views

PipedReader never ready() at end of stream

I'm trying to write code that reads from a Reader in a non-blocking way, i.e. only calling read() after ensuring ready() returns true. To test the code, I use the PipedReader/PipedWriter combo, and ...
-2 votes
5 answers
80 views

Correct syntax for $(this) [closed]

I have a jquery function where I repeat the .red way too many times. I would like to replace them for $(this) instead, but I don't know the correct way to do it apparently. $(".red").ready(function ...
1 vote
6 answers
273 views

What triggers the jQuery ready() function?

I'm really confused now, I thought jQuery(document).ready(function(){ ... }) was triggered when the page ends to load all the stuff in. Well it doesn't look like that though, I was just experiencing :...
2 votes
1 answer
2k views

Ensure my javascript is the last thing executed when dom is modified [duplicate]

I am working on a page where javascript from various sources is being executed . I want to ensure my custom js is only executed AFTER everthing else has been done . The "other" js is call on various ...
0 votes
1 answer
65 views

Why jQuery doesn't find an element in ready event?

I defined object of CgridAdminView with the properties and methods: var CgridAdminView = { controller_name: 'work', div_table_id: 'grid-admin-works', tr_add: $('#' + this.div_table_id)....
-3 votes
3 answers
141 views

Print out the date after a number of days from June 1st,2013 [closed]

how would i make a program that prints out the date after a number of days from June 1st,2013? Any help is appreciated Example: if 45 is entered it should output July 16,2013 Im using ReadyToPrgram ...
0 votes
0 answers
35 views

Script not firing when window's ready

I have a script that resize a text .div (.block-left), to make room for a large picture. The picture width and height are determined by the user window. Depending on this parameters the text .div ...
5 votes
3 answers
4k views

Android - Wait for external storage to ready

I'm currently developing a live wallpaper that reads from external storage. When the device is booting up, I assume it's possible for the live wallpaper to be launched before the storage is ready. ...
5 votes
2 answers
12k views

MooTools: domready vs load

With which will function(){} fire first? A) window.addEvent('domready', function(){}); B) window.addEvent('load', function(){});
0 votes
1 answer
2k views

jQuery form on ready/load does not work

I have this 'template' code (just for example): $(document).on("<EVENT>", "form", function() { $(this).find(".input input").each(function() { var required = $(this).attr("required");...
3 votes
1 answer
1k views

Is " $(document).ready(function () " required for AJAX generated JS?

Please answer this question as I have failed to get proper understanding of the issue and simply cannot locate any material to read on it. The question, generically speaking, requires the ...
1 vote
2 answers
4k views

Calling a jQuery function multiple times

So, I have this function in jQuery: $(function(){ $( ".unfocused" ).click(function ClickHeader () { $( this ).addClass( "focused" ); $( this ).removeClass( "unfocused" ); $(".header")....
1 vote
1 answer
543 views

$(document).ready but in IE document.body is still null

This seems weird. In IE I'm waiting for $(document).ready(). Once document is ready, I console log document.body and it's null. If I wrap it in a timeout, it's there? Shouldn't document.body be good ...
0 votes
1 answer
312 views

jQuery for edit doesn't work on AJAX loaded page?

I'm new in AJAX and jQuery, I try to use jQuery for my edit page. When this file is executed on direct page like localhost/test/test_edit.php it works perfectly, but it doesn't work in AJAX loaded ...
0 votes
1 answer
72 views

whats wrong with this syntax??

i want to define this script, cause i want to call it: $j(document).ready(function() { //Show and hide the Loading icon on Ajax start/end $j('.bwbps_uploadform').submit(function() { ...
0 votes
1 answer
268 views

RANDOM PLAY SOUND OVERLAP

Hey all I need your help. I have everything set up and working perfect for my random sound script. The problem is I have it set to when I mouse over a picture it plays a random sound (That's what I ...
1 vote
1 answer
730 views

center a background imaged css menu from http://cssmenumaker.com

im using ready made dropdown menu from http://cssmenumaker.com/menu/grey-red-drop-down-menu the menu is working pretty fine but i like to center the buttons.Is there any way to do that? Here is the ...
1 vote
1 answer
167 views

Unexpected behavior of code inside $(document).ready() -- Should it get executed sequentially? [duplicate]

I have been using JavaScript and jQuery for a while now. But I still haven't fully grasped how it all works. I profusely apologize if my question is redundant, incomprehensible and/or plain stupid. I ...
0 votes
1 answer
209 views

Retrigger my jquery function on ajax load

I have built a plugin that I run on document ready $("#pagecontainer").gumbyPageTransition(); I have a JQuery plugin binding all href with the class pageref to a click event. $("a.pagehref").on('...