aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/jqLite.js')
-rw-r--r--src/jqLite.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/jqLite.js b/src/jqLite.js
index 8305f0c3..d156ae6d 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -718,7 +718,16 @@ forEach({
},
next: function(element) {
- return element.nextSibling;
+ if (element.nextElementSibling) {
+ return element.nextElementSibling;
+ }
+
+ // IE8 doesn't have nextElementSibling
+ var elm = element.nextSibling;
+ while (elm != null && elm.nodeType !== 1) {
+ elm = elm.nextSibling;
+ }
+ return elm;
},
find: function(element, selector) {