Ad_banner fixed

This commit is contained in:
Manson Wang 2013-10-02 15:51:22 +08:00
parent 8200baddbb
commit 42decd3ff4
2 changed files with 11 additions and 10 deletions

View File

@ -1,4 +1,3 @@
<%= javascript_include_tag "lib/jquery.cycle.all.latest.js"%>
<div style='position:relative'>
<ul id='banner_nav' class='clear banner_nav-<%= @ad_banner.title.dehumanize %>'></ul>
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>

View File

@ -19,7 +19,7 @@ function ajax_load_proc(wapper,url,isBanner){
if (textSta == 'success') {
if(isBanner=="true"){
wapper.html(respText);
setTimeout("BannerCycle()", 2500);
BannerCycle();
}else{
wapper.html(respText);
}
@ -32,6 +32,7 @@ function ajax_load_proc(wapper,url,isBanner){
function BannerCycle(){
var banner = banners[banner_index];
banner_index++;
$.getScript('/static/jquery.cycle.all.latest.js', function(){
$(banner.banner_name).ready(function() {
$(banner.banner_name).cycle({
delay: -1000,
@ -41,6 +42,7 @@ function BannerCycle(){
pagerAnchorBuilder: function(idx, slide) { return "<li><a href='#'></a></li>"; }
});
});
});
}
// Ad Banner FX code [start]