These are some readers' responses. Read the full article to see what all the fuss is about.
-
Popular
Categories
- .Net & C# (1)
- C++ (5)
- Coding (3)
- Copyright, etc. (3)
- HTML/CSS (2)
- Java (14)
- JavaScript (5)
- JUnit (3)
- Recommendations (9)
- Risks (6)
- Software projects (2)
- SQL (4)
- Testing (6)
- Tools (4)
- Web (4)
- Web publishing (16)
- Windows (1)
- WordPress (27)
27 responses
Other comment pages: [1] 2 »
Wow
I just realised today that I need this functionality. So I did a google search and found this.
Then I wonder why there’s no comments for such a cool thing - I check the date and it was posted today !! What great timing : )
I’ll give it a go now …
weepy
*…(
Very Nice function, surprised that this was not included in jquery to begin with — brilliant :).
If you think this should be part of jQuery, you can rate it on the jQuery site:
http://jquery.com/plugins/project/elementReady
If enough people use the plugin and rate it highly then it may eventually be included in the jQuery core. Spread the word!
What is difference between your plugin and jQuery .ready() function. I think that each methods doing the same result. I can write:
$j(’element’).ready(function);
Zysio,
$('id').ready(function)doesn’t do what you think it does. Actually the ‘id’ is pretty much ignored — it’s equivalent to$(document).ready(function). In other words, the function is not called until the entire document has been loaded. That’s why you need to use$.elementReady('id', function): then the function gets called as soon as the element is loaded, even if the document is not completely loaded.This makes sense when you think about it: if the element whose id is ‘id’ has not yet been loaded, then
$('id')contains no elements. Therefore, ifreadyapplied to individual elements then$('id').ready(function)would have no effect.Note there was a bug in the original version of elementReady that I posted here. It could cause some elementReady events not to fire if you called
elementReadymore than once on a page. I have fixed the bug and updated to version 0.5.Maybe a dumb question: how can I check to see if two ID’s have been loaded? I need to run a function after two iFrames have been loaded and I don’t think it’s the same as chaining multiple calls…or maybe it is.
Any help is appreciated.
Other comment pages: [1] 2 »