Creating a sidebar in jQuery mobile

前端 未结 2 2077
春和景丽
春和景丽 2021-02-19 08:13

Normally, when you create a data-role=\"page\" element with jQuery mobile, it takes over the entire viewing area. For this reason, I don\'t understand how to create a sidebar. I

2条回答
  •  孤街浪徒
    2021-02-19 09:07

    Looking over the beta Split View syntax you can control the "Sidebar" like this:

    This would be the sidebar/split view on a tablet, would show up stacked on a mobile device
    This is the main content. If Tablet device this would be to the right of the above content, if mobile this would be below the above content.

    Docs: http://jquerymobile.com/demos/1.0b1/ (right click to view source)

    Pertinent CSS: http://jquerymobile.com/demos/1.0b1/docs/_assets/css/jqm-docs.css

    A decent ALA article talking about media queries (what they used to do this): http://www.alistapart.com/articles/responsive-web-design/

提交回复
热议问题