javascript - jQuery doesn't rotate images -
i'm trying use datalist fetch image fro list >>> , jquery rotate image jquery doesn't rotate images .... 1 tell me what's wrong on code
<script type="text/javascript"> var activenewitem = 0; $(function () { var totalitems = $("#myrotator li").length; $("#myrotator li").hide(); $("#myrotator li::nth-child(" + ((activenewitem++ % totalitems) + 1) + ")").show(); settimeout('rotatewhatsnew()', 5000); //30000 }); </script> <asp:datalist id="rotator" bordercolor="black" cellpadding="2" headerstyle-backcolor="darkblue" headerstyle-forecolor="yellow" repeatcolumns="1" runat="server" height="179px" width="168px"> <headerstyle backcolor="darkblue" forecolor="yellow"></headerstyle> <itemtemplate> <div id="myrotator"> <ul type="none"> <li style='padding: 3px; list-style: none; width: 200px; word-wrap: break-word; display: none'> <img id="image" height='90%' width='90%' src='<%=siteurl%>/<%# databinder.eval(container.dataitem,"thumbnailonform")%>'/> </li> </ul> </div> </itemtemplate> </asp:datalist>
jquery code fade images in throughout sequence $(document).ready(function () { $('#bannerslideshow').innerfade({ speed: 2500, timeout: 7000, type: 'sequence', containerheight: '300px' }); example of list of images <ul id="bannerslideshow" style="list-style-type: none;"> <li><img src="siteimages/headerbackgrounds/headerbackground1.png" alt="" /></li> <li><img src="siteimages/headerbackgrounds/headerbackground2.png" alt="" /></li> <li><img src="siteimages/headerbackgrounds/headerbackground3.png" alt="" /></li> <li><img src="siteimages/headerbackgrounds/headerbackground4.png" alt="" /></li> <li><img src="siteimages/headerbackgrounds/headerbackground5.png" alt="" /></li> <li><img src="siteimages/headerbackgrounds/headerbackground6.png" alt="" /></li> </ul>
Comments
Post a Comment