wrapAll not working in IE8...
In order to wrap mutiple elements into one div, I use following function:
// check if there is more than one table
if ($('#indexen table.zoekResultaat').length > 1) {
// each table has an h4 before it, and a link after it, and these three should be wrapped into the div
$('#indexen h4').each(function(){
var $this = $(this);
// get the three together and wrap them
$this.add($this.next()).add($this.next().next()).wrapAll('<div class="tableFloater"></div>');
});
}
This script works fine in all standards-compliant browsers (FF, Opera, Chrome, Safari), and even in IE6 and IE7, but not in IE8 (unless i switch to compatibility mode). I am really stumped, so if anyone can poimt me in the right direction I will be very grateful!