Ad_banner fixed

This commit is contained in:
Manson Wang 2013-10-02 15:51:22 +08:00
parent b180ef41f7
commit a21c5c6d5c
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,15 +32,17 @@ function ajax_load_proc(wapper,url,isBanner){
function BannerCycle(){
var banner = banners[banner_index];
banner_index++;
$(banner.banner_name).ready(function() {
$(banner.banner_name).cycle({
delay: -1000,
fx: banner.banner_fx,
timeoutFn: getTimeout,
pager: banner.banner_pager,
pagerAnchorBuilder: function(idx, slide) { return "<li><a href='#'></a></li>"; }
$.getScript('/static/jquery.cycle.all.latest.js', function(){
$(banner.banner_name).ready(function() {
$(banner.banner_name).cycle({
delay: -1000,
fx: banner.banner_fx,
timeoutFn: getTimeout,
pager: banner.banner_pager,
pagerAnchorBuilder: function(idx, slide) { return "<li><a href='#'></a></li>"; }
});
});
});
});
}
// Ad Banner FX code [start]