I can’t get load function to work with IE. In Google Chrome my website runs fine.
I tried to fix the issue with “no-cache” strategy, but no luck. What else should i do to make it work with IE?
Source:
<meta http-equiv="Cache-control" content="no-cache">
<script type="text/javascript" src="ayarlar/jquery-1.7.1.min.js"></script>
</script>
<style type="text/css">
.slaytGosterimi {
position: relative;
left:10%;
top:15%;
}
body {
background:#000000 ;
}
.ustBackground {
position: relative;
left:15%;
width:70%;
height:100%;
background:#F4F4F4;
}
</style>
<div class="ustBackground">
<!--Slayt gösterisi içeriği!-->
<div class="slaytGosterimi" id="slaytGosterimi">
<script type="text/javascript">
$("#slaytGosterimi").load('slaytGosterim.htm');
</script>
</div>
<!--Slayt gösterisi içeriği!-->
</div>
Put your code in the
<head>section and change to this:As you got the script written inside the element it’s trying to access, that element wasn’t ready yet.
As rule of thumb, always wrap code that access DOM elements inside
$(document).ready()no matter where it’s placed – don’t count on the browser to be forgiving.