|
api.openFrameGroup({
name: 'indexGroup',
scrollEnabled: true,
rect: {x: 0, y: $api.offset(header).h + $api.offset(nav).h, w: 'auto', h: api.frameHeight - ($api.offset(header).h + $api.offset(nav).h + $api.offset(footer).h)},
bounces: false,
index: 0,
frames: frames
}
子页面(焦点图页面)代码
<body>
<div id='slide' class='swipe'>
<div class='swipe-wrap' id="banner-content">
<div onclick="" tapmode="" data-value="apicloud重新定义移动应用开发">
<img src="../../image/4.png"/>
</div>
<div onclick="" tapmode="" data-value="apicloud重新定义移动应用开发">
<img src="../../image/5.png"/>
</div>
<div onclick="" tapmode="" data-value="apicloud重新定义移动应用开发">
<img src="../../image/6.png"/>
</div>
<div onclick="" tapmode="" data-value="apicloud重新定义移动应用开发">
<img src="../../image/7.png"/>
</div>
<div onclick="" tapmode="" data-value="apicloud重新定义移动应用开发">
<img src="../../image/8.png"/>
</div>
<div onclick="" tapmode="" data-value="apicloud重新定义移动应用开发">
<img src="../../image/9.png"/>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/swipe.js"></script>
<script type="text/javascript">
function initSlide() {
var $pointer = $api.byId('pointer');
window.mySlide = Swipe(slide, {
continuous: true,
disableScroll: true,
stopPropagation: true,
callback: function (index, element) {
var $actA = $api.dom($pointer, 'a.active');
$api.removeCls($actA, 'active');
$api.addCls($api.eq($pointer, index + 1), 'active');
$api.html($api.byId('banner-title'), $api.attr(element, 'data-value'))
},
transitionEnd: function (index, element) {
return false;
}
});
}
initSlide();
</script>
|
|