changes for ad_banner
This commit is contained in:
1 parent
19bf2f2be5
commit
92d2af13f2
45 files changed
+500
-794
No files matched your search
@@ -23,12 +23,14 @@ function ajax_load_proc(wapper,url,isBanner){
|
||||
if (textSta == 'success') {
|
||||
if(isBanner=="true"){
|
||||
wapper.html(respText);
|
||||
var banner = banners[banner_index];
|
||||
$(banner.banner_name+" > img").each(function(){
|
||||
$(this).load(function(){ banner.image_loaded++; });
|
||||
});
|
||||
BannerCycle(banner_index);
|
||||
banner_index++;
|
||||
$( '.cycle-slideshow' ).cycle();
|
||||
// var banner = banners[banner_index];
|
||||
// $(banner.banner_name+" > img").each(function(){
|
||||
// $(this).load(function(){banner.image_loaded++; });
|
||||
// });
|
||||
// BannerCycle(banner_index);
|
||||
// banner_index++;
|
||||
// $( '.cycle-slideshow' ).cycle();
|
||||
}else{
|
||||
wapper.html(respText);
|
||||
}
|
||||
@@ -41,21 +43,26 @@ function ajax_load_proc(wapper,url,isBanner){
|
||||
function BannerCycle(banner_index){
|
||||
var banner = banners[banner_index];
|
||||
// Wait untill all images are loaded
|
||||
// console.log(banner.image_loaded, $(banner.banner_name+" img").length, banners[banner_index])
|
||||
if (banner.image_loaded==$(banner.banner_name+" img").length){
|
||||
$(banner.banner_name).cycle({
|
||||
delay: -1000,
|
||||
$(banner.banner_name).cycle({
|
||||
fx: banner.banner_fx,
|
||||
timeout: banner.time_to_next,
|
||||
timeout: banner.timeout,
|
||||
pager: banner.banner_pager,
|
||||
speed: banner.banner_speed,
|
||||
fit: 1,
|
||||
containerResize: 0,
|
||||
width: banner.banner_width,
|
||||
height: banner.banner_height,
|
||||
pagerAnchorBuilder: function(idx, slide) { return "<li><a href='#'></a></li>"; }
|
||||
});
|
||||
}else{
|
||||
setTimeout("BannerCycle("+banner_index+")",500);
|
||||
setTimeout("BannerCycle("+banner_index+")",100);
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.slideshow img', function()
|
||||
$(document).on('click', '.cycle-slideshow img', function()
|
||||
{
|
||||
if($(this).attr('link_url')!='')
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user