Skip to content

Commit

Permalink
added check for parentNode.nextSibling
Browse files Browse the repository at this point in the history
  • Loading branch information
David Furfero committed Apr 15, 2009
1 parent 9d18963 commit f47cddd
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions jquery.onAvailable-1.0.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
/**
* NOTE: If element is last the child of its parent node, include at
* least one character of whitespace or onContentReady will not fire
* until DOMReady
* until DOMReady.
*/

/**
@@ -189,7 +189,8 @@
* $.onAvailable listeners. If the DOM is ready or the next sibling
* is detected, execute callbacks for all $.onContentReady listeners.
*/
if (el && (!listener.checkContent || (listener.checkContent && ($.isReady || el.nextSibling)))) {
if (el && (!listener.checkContent || (listener.checkContent &&
(el.nextSibling || el.parentNode.nextSibling || $.isReady)))) {

_this.executeCallback(el, listener);

2 changes: 1 addition & 1 deletion jquery.onAvailable-1.0.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f47cddd

Please sign in to comment.