每一个panel在智能设备上都显示为一个页面:

<div id="content">内如果有多个panel,每次只能显示一个panel,关闭后才能显示另外一个panel。

  panel的属性:

官方文档:

  1. css property - overflow:hidden - When set, this will disable auto-wiring of the scroller. Usefull for panels that need to auto expand, like carousels or google maps
  2. selected="true" - When set, this will make the panel the default panel that gets loaded.
  3. modal="true" - When set, this turns the panel into a modal window that takes up 100% of the screen (can be changed via CSS).
  4. data-header="id" - when set, it will load the custom <header> tag with that ID for that panel
  5. data-footer="id" - when set, it will load the custom <footer> tag with that ID for that panel
  6. data-nav="id" - when set, it will load the custom <nav> tag with that ID for that panel
  7. data-defer="filename.html" - This will load content into the panel from a remote page/url. This is useful for separating out content into different files. af.ui.ready is not available until all files are loaded asynchronously.
  8. data-tab="anchor_id" - This will set the selected tab in the bottom navbar to the id. Useful for when you update your panel via JS and not clicking a bottom tab.
  9. data-load="func_name" - This is the string name of a function to run when the panel is loaded. The div is passed in as a parameter so you can use a single function and act upon other attributes.
  10. data-unload="func_name" - This is the string name of a function to run when the panel is unloaded

data-header="id"  自定义header

data-footer="id"  自定义footer

data-nav="id"     左侧的导航条

data-defer="filename.html"  可以根据设置的地址给panel加载内容。

data-tab="anchor_id"   在此panel显示时,将选中footer中id为anchor_id的选项。

data-load="func_name"  在panel加载后,执行的方法。这个方法在panel每次正好在当前页面时都会执行。

data-unload="func_name"  在panelunload后执行的方法,也就是离开本panel时执行

title="home"   可以设定header的显示的内容。

   selected="true" 可以是这个panel变成默认的panel


<divclass="panel"id="about"style="overflow:hidden"> </div><!-- no scrolling -->
<divclass="panel"id="login"selected="true"> </div><!-- Default loaded panel -->
<divclass="panel"id="login"modal="true"> </div><!-- Modal window -->
<divclass="panel"id="about"data-header="default"> </div><!-- Change the header -->
<divclass="panel"id="login"data-footer="none"> </div><!-- This removes the footer!-->
<divclass="panel"id="login"data-nav="settings"> </div><!-- Change the side nav menu -->
<divclass="panel"id="login"data-tab="settings"> </div><!-- Change the selected tab to settings -->
<divclass="panel"id="login"data-defer="app/login"> </div><!-- Load the login content from the HTTP request of app/login -->
<divclass="panel"id="login"data-load="showCount"data-counter='5'> </div><!-- execute showCount when the panel is loaded -->
<script> function showCount(div){alert($(div).data('counter'));} </script>
<divclass="panel"id="loggin"data-unload="showCount"data-counter='3'> </div><!-- execute showCount when the panel is unloaded -->

欢迎加入学习交流群:333492644

app-framework学习--pannel介绍相关推荐

  1. ionic+angularJS+iOS混合开发app的学习资料介绍和基本步骤(干货)

    ionic+angularJS+iOS 先安装nodejs.npm.angularJS和ionic 其中nodeJS和npm安装可以到官网下载nodeJS,然后双击安装就好很简单(网址: http:/ ...

  2. jqMobi(App Framework)入门学习(一)

    jqMobi(App Framework)入门学习(一) 1. 什么是jqMobi? jqMobi是由appMobi针对HTML5浏览器和移动设备开发的javascript框架.是个极其高速的查询选择 ...

  3. Framework学习(五)应用程序启动过程

    注释1处设置Flag为Intent.FLAG_ACTIVITY_NEW_TASK,这样根Activity会在新的任务栈中启动. 注释2处调用了Activity的startActivity函数. fra ...

  4. Framework学习之路(一)—— UI绘制深入源码分析

    Framework学习之路(一)-- UI绘制深入源码分析 本篇为笔者对Android SDK 33版本的UI绘制入口进行追踪的过程,主要作笔记作用.由于笔者经验尚浅,水平也有限,所以会存在很多不足的 ...

  5. Entity Framework 学习

    Entity Framework 学习初级篇1--EF基本概况... 2 Entity Framework 学习初级篇2--ObjectContext.ObjectQuery.ObjectStateE ...

  6. Entity Framework学习中级篇

    1-EF支持复杂类型的实现 本节,将介绍如何手动构造复杂类型(ComplexType)以及复杂类型的简单操作. 通常,复杂类型是指那些由几个简单的类型组合而成的类型.比如:一张Customer表,其中 ...

  7. dommel mysql_.Net Core AA.FrameWork应用框架介绍

    开发多年,一直在从社区获取开源的便利,也深感社区力量的重要性,今天开源一个应用基础框架AA.FrameWork,也算是回馈社区,做出一点点贡献,希望能够帮助类似当年入行的我. AA.FrameWork ...

  8. Android FrameWork学习(二)Android系统源码调试

    点击打开链接 通过上一篇 Android FrameWork学习(一)Android 7.0系统源码下载\编译 我们了解了如何进行系统源码的下载和编译工作. 为了更进一步地学习跟研究 Android ...

  9. 修改android framework学习

    2019独角兽企业重金招聘Python工程师标准>>> 1:android平台编译自己编写的framework级service server实录 http://blog.sina.c ...

最新文章

  1. 第1条:考虑用静态工厂方法代替构造器
  2. 更新不了_一个作者在起点中文网写小说,半年更新38万字,还是没签约成功
  3. 各种Web漏洞测试平台
  4. 成为DBA的艰辛之路————需要掌握一笔不小的知识
  5. flask 开发接口测试平台
  6. 02-15 GUCCI 我喜欢的
  7. PWA(Progressive Web App)入门系列:(四)Promise
  8. devops 解决了啥问题_您的DevOps有什么问题?
  9. java必学_Java基础系列之初识JAVA
  10. Js执行机制——同步和异步
  11. php微信接口调用,PHP调用微信接口报错
  12. newtonsoft.json java,Newtonsoft.Json无法反序列化有效的JSON
  13. 给《人人都是产品经理》的一封信
  14. 人脸识别最全知识图谱,中国学者数量全球第三—清华大学出品
  15. Xmind思维导图 常用快捷键使用
  16. ​跨学科整合,打造大数据最强集团军:清华大学大数据能力提升项目宣讲会来了!...
  17. Python-Django毕业设计汽车站售票管理系统(程序+Lw)
  18. CVPR 2017:Interspeices Knowledge Transfer for Facial KeyPoint Detection(跨物种脸部关键点检测知识迁移)
  19. 老款Tplink路由器如何桥接
  20. 关于研究鼠标绘制平滑曲线的阶段总结

热门文章

  1. “扣扣保镖”一剑封喉,腾讯QQ溃不成军
  2. 全国潮汐表 v10.1.1
  3. java运行平台的叙述,智慧职教: 以下关于Java运行平台的叙述错误的是( )。
  4. Semantic3D
  5. 人机大战结局,为何日本公众的看法与我们不同?
  6. 使用susy内置混合宏异常:Undefined mixin ‘at-breakpoint‘
  7. 【教学类-08-01】20221010《门牌号(6层*3间 黑色版)》(大班主题《我们的城市》)
  8. Mac 安装Git
  9. 简单的C++游戏载入界面设计
  10. 环信服务器发送消息ext,发送消息