I have this code:
$(function(){
$('body').append('<div id="tooltipMaterials"><span id="arrow"></span><div id="inside"></div></div');
var $tooltip = $('#tooltipMaterials');
$tooltip.hide();
$('.material a').mouseenter(function(){
var index = $(this).index();
var offset = $(this).offset();
var top = offset.top+46;
var left = offset.left-$tooltip.width()+46;
$tooltip.css({top:top+'px',left:left+'px'});
$tooltip.children('#inside').empty();
$tooltip.prepend('<span id="preloader"></span>');
$tooltip.fadeIn(200);
$.ajax({
url:'materials.htm',
dataType: 'html',
cache: false,
error:function(xhr, status, errorThrown) {
alert(errorThrown+'\n'+status+'\n'+xhr.statusText);
},
success:function(data){
$('#preloader').remove();
alert(data);
alert($(data).find('.item:eq('+index+')').html());
$tooltip.children('#inside').html($(data).find('.item:eq('+index+')'));
}
});
}).mouseleave(function(){
$tooltip.hide();
}).click(function(){return false;});
});
In IE the find doesn’t work. It doesn’t return anything.
That, combined with the fact you’re talking about Internet Explorer explains it.
This should tell you everything you need to know:
http://jdbartlett.github.com/innershiv/
Another resource with a nice explanation: http://css-tricks.com/html5-innershiv/