Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript AnythingSlider a tag problem Re: AnythingSlider a tag problem

#71701
nfxs
Member

Solved it another way. The slider didnt copy correctly the first and last il to the cloned items. It did this:

<LI style=”WIDTH: 800px; HEIGHT: 390px” class=”cloned panel”>
</A style=”WIDTH: 100%; HEIGHT: 100%”>
</LI>
<LI style=”WIDTH: 800px; HEIGHT: 390px” class=panel>
<A style=”WIDTH: 100%; HEIGHT: 100%” href=”http://www.youtube.com&#8221; jQuery1291095351964=”17″>
<IMG alt=”” src=”images/slide-env-2.jpg” width=”100%” height=”100%”>
</A>
</LI>
<LI style=”WIDTH: 800px; HEIGHT: 390px” class=”panel activePage”>
<A style=”WIDTH: 100%; HEIGHT: 100%” href=”http://www.google.com&#8221; jQuery1291095351964=”18″>
<IMG alt=”” src=”images/slide-env-1.jpg” width=”100%” height=”100%”>
</A>
</LI>
<LI style=”WIDTH: 800px; HEIGHT: 390px” class=”cloned panel”>
</A style=”WIDTH: 100%; HEIGHT: 100%”>
</LI>

so i replaced the cloned items with this first and last li items removing the <a> tag:
var firstItem = $(‘#slider1 li:not(.cloned):first’);
var lastItem = $(‘#slider1 li:not(.cloned):last’);

var firstCloned = $(‘#slider1 li.cloned:first’);
var lastCloned = $(‘#slider1 li.cloned:last’);

lastCloned.html($(firstItem).find(‘a’).html());
firstCloned.html($(lastItem).find(‘a’).html());