0
다음 코드는 마우스 오버시 툴팁을 생성하는 코드입니다. 예를 들어 다음 코드를 사용하여 텍스트 위에 마우스를 올려 놓습니다.jQuery/Ajax - IE가 외부 파일에서 데이터를 가져 오지 않습니까?
span class="ttip" rel="#tip_1"
그런 다음 외부 파일 (tooltips.html)에서 tip_1의 ID로 div를 가져옵니다. 문제는 IE 7에 & 8 - 그냥 툴팁 상자를로드 -하지의 내용을 내부 ...
어떤 아이디어를 (가 tooltips.html 파일과 통신 할 수처럼)하세요?
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('.ttip').hover(function(){
var offset = jQuery(this).offset();
console.log(offset)
var width = jQuery(this).outerWidth();
var tooltipId = jQuery(this).attr("rel");
jQuery('#tooltip-cont').empty().load('/tooltips.html ' + tooltipId).fadeIn(500);
jQuery('#tooltip-cont').css({ top:offset.top, left:offset.left + width + 10 }).show();
}, function(){
jQuery('#tooltip-cont').stop(true, true).fadeOut(200);
});
});
</script>
코드가 좋을 것 같습니다. – mgraph
내 생각은 일부 툴팁이 작동하지 않기 때문에 실제 toltips.html 파일에 뭔가있는 것 같습니다. – CodeyMonkey
'fadeOut'과' fadeIn' 다음 테스트 – mgraph