基于jQuery的产品图文展示代码,可实现点击左右滚动,自动滚动。动态效果还不错。基于jQuery的产品图文展示jQuery插件stepcarousel.js。
配置注意下面几处的ID,要与HTML结构中ID对应。
galleryid: 'mygallery', //id of carousel DIV
document.getElementById('displaycssbelt').style.visibility="visible";
document.getElementById('stocklevels').style.visibility="visible";
配置参看:
stepcarousel.setup({
galleryid: 'mygallery', //id of carousel DIV
beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
panelbehavior: {speed:300, wraparound:false, persist:true},
autostep: {enable:true, moveby:4, pause:10000},
defaultbuttons: {enable: true, moveby: 4, leftnav: ['images/butt-left.gif', 0, 64], rightnav: ['images/butt-right.gif', -11, 64]},
statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
oninit:function(){
isloaded=true
document.getElementById('displaycssbelt').style.visibility="visible";
document.getElementById('stocklevels').style.visibility="visible";
}
})