Php Pretto和Touchwipe
我已经试着从这里实现了认可的答案:使用touchwipe和pretto 该站点位于wordpress中,我已经正确调用了touchwipe javascript,并在我的page.php中添加了上面链接中带有in-script标记的代码 因为某种原因,虽然我不能让它工作 这是我在page.php中的代码Php Pretto和Touchwipe,php,jquery,wordpress,Php,Jquery,Wordpress,我已经试着从这里实现了认可的答案:使用touchwipe和pretto 该站点位于wordpress中,我已经正确调用了touchwipe javascript,并在我的page.php中添加了上面链接中带有in-script标记的代码 因为某种原因,虽然我不能让它工作 这是我在page.php中的代码 <?php get_header(); $no_feat_class = ''; if( !options::logic( 'blog_post' , 'enb_featured' )
<?php
get_header();
$no_feat_class = '';
if( !options::logic( 'blog_post' , 'enb_featured' ) || !
has_post_thumbnail( $post -> ID ) ){
$no_feat_class = ' no_feat ';
}
$post_id = $post -> ID;
/*---------------------*/
$post_format = get_post_format( $post -> ID );
if(!strlen($post_format)){ $post_format = 'standard';}
?>
<script>
$(document).ready(function(){
function setupBox() {
$("a[rel^='prettyPhoto']").prettyPhoto({
social_tools: false,
theme:'dark_rounded',
changepicturecallback: function() {
setupSwipe();
}
});
}
function setupSwipe() {
$(".pp_hoverContainer").touchwipe({
wipeLeft: function() {
$.prettyPhoto.changePage('next');
},
wipeRight: function() {
$.prettyPhoto.changePage('previous');
},
min_move_x: 20,
min_move_y: 20,
preventDefaultEvents: true
});
}
setupBox();
});
</script>
<section id="main">
<div class="main-container">
<?php
while( have_posts () ){
the_post();
$meta = meta::get_meta( $post -> ID, 'settings' );
$meta_enb = options::logic( 'blog_post' , 'meta' );
} /*EOF while( have_posts () ) */
?>
<?php
$resizer = new LBPageResizer('page');
$resizer -> render_frontend();
?>
</div>
</section>
<?php get_footer(); ?>
$(文档).ready(函数(){
函数setupBox(){
$([rel^='prettypto'])。prettypto({
社会工具:错误,
主题:"黑暗",,
changepicturecallback:函数(){
设置滑动();
}
});
}
函数setupSwipe(){
$(“.pp_hoverContainer”).touchwipe({
wipeLeft:函数(){
$.pretto.changePage('next');
},
wipeRight:函数(){
$.prettypto.changePage('previous');
},
最小移动次数:20,
最小移动时间:20,
预防默认事件:true
});
}
setupBox();
});
我做错什么了吗