jQuery Mobile Panel打开时隐藏flexslider [英] Jquery Mobile Panel hides flexslider when opened

查看:101
本文介绍了jQuery Mobile Panel打开时隐藏flexslider的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用jquery移动面板,当我打开面板时它会隐藏滑块,它会删除/隐藏滑块.将rel="external"添加到面板按钮不会执行任何操作,因为它不是指向物理页面的链接.

I am trying to use jquery mobile panels and it hides the slider when I open the panel, it removes/hides the slider. Adding rel="external" to the button for panel doesn't do anything as it is not a link to physical page.

以下是小提琴中的示例:

Here is an example given in fiddle:

http://jsfiddle.net/dhavaljani/zZKhT/

面板HTML

<div data-role="panel" id="rightpanel2" data-position="right" data-display="push" data-theme="d" data-content-theme="d">`
  <ul data-role="listview" data-theme="d" data-icon="false">
    <li><a href="#" data-icon="false">Home</a></li>
    <li><a href="#" data-icon="false">Services</a></li>
    <li><a href="#" data-icon="false">Case Studies</a></li>
    <li><a href="#" data-icon="false">About Us</a></li>
    <li><a href="#" data-icon="false">Contact Us</a></li>
  </ul>
  <a href="#demo-links" data-rel="close" class="ui-btn ui-shadow ui-corner-all ui-btn-e ui-icon-phone ui-btn-icon-left ui-btn-inline orange-btn">123-456-7890</a>
</div>

推荐答案

这是一个错误在jQuery Mobile 1.4 中,作为第一次打开面板时,它将兄弟姐妹包裹在 header footer 之外的<div class="ui-panel-wrapper">

This is a bug in jQuery Mobile 1.4, as panel when first opened, it wraps it's siblings in a <div class="ui-panel-wrapper"> other than header and footer.

在早期版本的jQuery Mobile中不存在此问题.

This problem isn't present in previous versions of jQuery Mobile.

<section class="slider ui-panel-wrapper">
 <!-- elements -->
</section>

演示

Demo

这篇关于jQuery Mobile Panel打开时隐藏flexslider的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆