嗨,大家好我搜索了很多,但我找不到解決我的問題,我使用jQuery手機,我有一個元素有data-role="page" and data-url="link"
jQuery手機頁面不採用頁面的全角/縮放
現在我的問題是,我的元素並不需要在屏幕的整個寬度,如用戶有放大到了極致,這就是我want.I還設置<meta name="viewport" content="width=device-width, user-scalable=no">
,但沒有運氣:(
請大家給我一個解決方案。
// LE
<?php get_header(); ?>
<?php $var1 = query_posts('post_type=Home Pages&meta_key=select_column_column&meta_value=Left');?>
<?php if (have_posts($var1)) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php $color = get_post_meta($post->ID,'select_color_color',true); ?>
<article data-role="page" data-transition="slide">
<div class="sprite top-<?=$color?>"></div>
<div class="txt <?=$color?> clearfix">
<?php if(has_post_thumbnail()): ?>
<?php the_post_thumbnail('post-image'); ?>
<?php endif; ?>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
</div>
<div class="sprite bottom-<?=$color?>"></div>
</article>
<?php endwhile; ?>
<?php endif; wp_reset_query();?>
<?php get_footer(); ?>
$('article').bind("swipeleft", function(){
var nextpage = $(this).next('article[data-role="page"]');
// swipe using id of next page if exists
if (nextpage.length > 0) {
$.mobile.changePage(nextpage, {transition: "slide",
reverse: false}, true, true);
}
$('article').unbind('swipeleft', nextpage);
});
$('article').bind("swiperight", function(){
var prevpage = $(this).prev('article[data-role="page"]');
if (prevpage.length > 0) {
$.mobile.changePage(prevpage, {transition: "slide",
reverse: true}, false, true);
}
$('article').unbind('swiperight', prevpage);
});
請發表您的代碼。 – Omar 2013-02-16 14:24:48
完成!先生,在這裏你走了! – Uffo 2013-02-16 15:03:56
請發佈呈現的html標記而不是php代碼。 – peterm 2013-02-16 15:52:33