init
This commit is contained in:
42
app/th/view/include/banner.phtml
Executable file
42
app/th/view/include/banner.phtml
Executable file
@@ -0,0 +1,42 @@
|
||||
<!-- 轮播 s -->
|
||||
<?php
|
||||
$bigbanners = getBannerList(31, 6);
|
||||
if ($bigbanners):
|
||||
?>
|
||||
<div class="homebans">
|
||||
<div class="hd">
|
||||
<ul class="banner_no">
|
||||
<?php foreach ($bigbanners as $k => $banner): ?>
|
||||
<li id="<?php echo $banner['alt'];?>"><?php echo $k + 1; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bd">
|
||||
<ul>
|
||||
<?php foreach ($bigbanners as $banner): ?>
|
||||
<li><a href="<?php echo $banner['url']; ?>"><img src="<?php echo getImage($banner['picture']); ?>"/></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(".homebans").slide({mainCell: ".bd ul", autoPlay: true, delayTime: 3000});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(".homebans").slide(
|
||||
{mainCell: ".bd ul", autoPlay: true, delayTime: 100}
|
||||
|
||||
);
|
||||
$(function(){
|
||||
function aa() {
|
||||
var color = $(".banner_no li[class='on']").attr('id');
|
||||
$(".header-Index #header").removeClass().addClass(color);
|
||||
//console.log(color);
|
||||
}
|
||||
|
||||
window.setInterval(aa,300);
|
||||
})
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
<!-- 轮播 e -->
|
||||
Reference in New Issue
Block a user