Javascript behaving inconsistently with PHP include files
<p>I have a very simple javascript animation that looks like this</p>

<pre><code>$(function() {
$('#slider1').cycle();
$('#slider2').cycle();
});
</code></pre>

<p>Im then calling in this script like this into my head:</p>

<pre><code>&lt;script type="text/javascript" src="js/slider.js"&gt;&lt;/script&gt;
</code></pre>

<p>Then the divs that have the id "slider1" and "slider2" are contained in php include files being called into the page like this:</p>

<pre><code>&lt;?php include('assets/col1.php'); ?&gt;
</code></pre>

<p>The code in the include file looks like this:</p>

<pre><code>&lt;div id="slider1"&gt;
&lt;img src="images/image1.png" /&gt;
&lt;img src="images/imgae2.png" /&gt;
&lt;img src="images/image3.png" /&gt;
&lt;img src="images/image4.png" /&gt;
&lt;/div&gt;
</code></pre>

<p>Which works fine except when you get to IE8 or IE9. The javascript will work about 75% of the time which is why this has me baffled. When you load the page or come back to the page, every once in awhile it just doesn't activate the javascript and all the images render in one long column (essentially what it looks like with no js function)</p>

<p>I suspect its something in the order in which IE9 is loading the PHP and the javascript but I am only a novice in both js and php so some very clear help on how to fix this would be really great. Thanks in advance.</p>
