插件地址: http://jquery.malsup.com/cycle/

<div id="propaganda">
<div id="pgdImg">
<span id="arrow1" ><img src="data:images/pgd/arrow1.png" /></span>
<span id="arrow2"><img src="data:images/pgd/arrow2.png" /></span>

<div id="ads">
<!--<div><a href="javascript:void(0)"><img src="data:images/pgd/pgd_1.png"/></a><div class="opacityBG"></div><div class="adsFont"><span>同富堂創新漢方1</span> <span><a class="moreInfo" href="javascript:void(0)">更多資料>></a></span></div></div>
<div><a href="javascript:void(0)"><img src="data:images/pgd/pgd_2.jpg"/></a><div class="opacityBG"></div><div class="adsFont"><span>同富堂創新漢方2</span> <span><a class="moreInfo" href="javascript:void(0)">更多資料>></a></span></div></div>
<div><a href="javascript:void(0)"><img src="data:images/pgd/pgd_3.jpg"/></a><div class="opacityBG"></div><div class="adsFont"><span>同富堂創新漢方3</span> <span><a class="moreInfo" href="javascript:void(0)">更多資料>></a></span></div></div>
<div><a href="javascript:void(0)"><img src="data:images/pgd/pgd_4.jpg"/></a><div class="opacityBG"></div><div class="adsFont"><span>同富堂創新漢方4</span> <span><a class="moreInfo" href="javascript:void(0)">更多資料>></a></span></div></div>
<div><a href="javascript:void(0)"><img src="data:images/pgd/pgd_5.jpg"/></a><div class="opacityBG"></div><div class="adsFont"><span>同富堂創新漢方5</span> <span><a class="moreInfo" href="javascript:void(0)">更多資料>></a></span></div></div>-->
</div>
</div>

$(function(){

$.getJSON('data/promo.json', {}, function(data){

var len=data.promo.length;
var promoStr="";
for(var i=0; i<len; i++)
{
var img=data.promo[i].imgPath;
var title=data.promo[i].title;
var linkUrl=data.promo[i].linkURL;
//promoStr+="<div><a href=\"_story/story_1.html\" target=\"_story\" onclick=\"slideDownAtIndex(1,true)\" ><img src=\""+img+"\"/></a><div class=\"opacityBG\"></div><div class=\"adsFont\"><div onclick=\"slideDownAtIndex(1,true)\">"+title+"</div> <div><a class=\"moreInfo\" href=\"_story/story_1.html\" target=\"_story\" onclick=\"slideDownAtIndex(1,true)\">更多資料>></a></div></div></div>";
promoStr+="<div><a href=\"_story/story_1.html\" target=\"_story\" onclick=\"slideDownAtIndex(1,true)\" ><img src=\""+img+"\"/></a><div class=\"opacityBG\"></div><div class=\"adsFont\"><div class=\"bTitle\" onclick=\"slideDownAtIndex(1,true)\">"+title+"</div> <div class=\"moreInfo\">更多資料>></div></div></div>";
}

$("#ads").html(promoStr);

$('#ads').cycle({
fx: 'fade',
speed: 1000,
timeout: 4000,
pause:1,
// nowrap: 1,
pager: '#pagerBar',
next: '#arrow2',
prev: '#arrow1',
//before: onAfter,
pagerAnchorBuilder: function(idx, slide) {
var num=parseInt(idx)+1;
return '<a href="#" class="NOTactiveSlide">'+num+'</a>';
},
pauseOnPagerHover:true

});

});

})

jquery cycle pugin的更多相关文章

  1. jQuery Cycle Plugin的使用

    jQuery幻灯片效果或者Slideshow效果当中如果不考虑touch效果的话,jQuery Cycle插件实在是太强大了,各种高大上的动画效果,如果想加上touch效果可以结合本blog介绍的wi ...

  2. jquery.cycle.js简单用法实例

    样式: a{text-decoration: none;} *{;;} /*容器设置*/ .player { width:216px; height:248px; background:url(htt ...

  3. jQuery图片切换插件jquery.cycle.js

    Cycle是一个很棒的jQuery图片切换插件,提供了非常好的功能来帮助大家更简单的使用插件的幻灯功能 下载cycle插件并引入,此时,注意把引入它的代码放在引入jQuery主文件之后. <he ...

  4. jquery.cycle.js

    jquery.cycle.js简单用法实例 样式: a{text-decoration: none;} *{margin:0; padding:0;} /*容器设置*/ .player { width ...

  5. jquery图片切换插件jquery.cycle.js参数详解

    转自:国人的力量 blog.163.com/xz551@126/blog/static/821257972012101541835491/ 自从使用了jquery.cycle.js,我觉得再也不用自己 ...

  6. 推荐15款创建漂亮幻灯片的 jQuery 插件

    对于设计师,开发者,摄影师或任何创造性的个人和企业,他们自己的网站是展示他们的技能和服务的最佳场所.你可能打算设计一个新的个人作品网站,不管你是从头开始或使用模板,都会需要使用 jQuery 幻灯片插 ...

  7. 240个jquery插件(转)

    http://www.kollermedia.at/archive/2007/11/21/the-ultimate-jquery-plugin-list/File upload Ajax File U ...

  8. jquery插件库

    jQuery由美国人John Resig创建,至今已吸引了来自世界各地的众多javascript高手加入其team. jQuery是继prototype之后又一个优秀的Javascrīpt框架.其经典 ...

  9. 基于jQuery 常用WEB控件收集

    Horizontal accordion: jQuery 基于jQuery开发,非常简单的水平方向折叠控件. Horizontal accordion: jQuery jQuery-Horizonta ...

随机推荐

  1. Android之fragment点击切换和滑动切换结合

    学了一小段时间的Android,主要接触的是UI设计,打交道最多莫过于fragment了吧.在Android3.0引入了fragment的概念后,几乎在所以的Android的应用中都可以看见其身影,已 ...

  2. sql注释

    一般使用数据库客户端软件是navicat,上面写sql用的注释符号一般是“#”或者“/* */”,比如: #我是注释 /*我是注释*/ 记得之前看别人sql里用“--”作为注释符号,结果我今天也试了一 ...

  3. 【USACO 1.2.3】命名那个数字

    [问题描述] 在威斯康辛州牛大农场经营者之中,都习惯于请会计部门用连续数字给母牛打上烙印.但是,母牛用手机时并没感到这个系统的便利,它们更喜欢用它们喜欢的名字来呼叫它们的同伴,而不是用像这个的语句&q ...

  4. css expression explaination

    http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx 据说已经被弃用的IE css写法,为了修复一些IE8及老版本 ...

  5. Extjs嵌入html

    方式一:使用组件的html属性嵌入html代码,如果html代码中存在参数可以使用字符串拼接的方式拼接html代码. html页面: <!doctype html> <html> ...

  6. $().change事件

    change([[data],fn]) 当元素的value值发生改变时发生change事件 适用于: 文本域 text textarea和select元素 text textarea 元素失去焦点时发 ...

  7. DIV隐藏与重显

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. linux命令——Grep 命令 用法大全

    1. 参数: -I :忽略大小写 -c :打印匹配的行数 -l :从多个文件中查找包含匹配项 -v :查找不包含匹配项的行 -n:打印包含匹配项的行和行标 2.RE(正则表达式) \ 忽略正则表达式中 ...

  9. linux下php上传文件注意

    linux下php上传文件注意1.修改上传目录权限linux 修改某目录下所有所有子目录权限chmod -R 777 html修改某目录为任何用户都用写读执行权限chmod a+rwx html2.设 ...

  10. 栈的讲解 和 栈的生长方向 源代码技巧分析,简直没SEI 啦

    函数的局部变量,都是存放在"栈"里面,栈的英文是:STACK.STACK的大小,我们可以在stm32的启动文件里面设置,以战舰stm32开发板为例,在startup_stm32f1 ...