appframework基础 : 四、panel 属性

<div class="panel" id="about" style="overflow:hidden"> </div> <!-- no scrolling -->
 
<div class="panel" id="login" selected="true"> </div> <!-- Default loaded panel -->
 
<div class="panel" id="login" modal="true"> </div> <!-- Modal window -->
 
<div class="panel" id="about" data-header="default"> </div> <!-- Change the header -->
 
<div class="panel" id="login" data-footer="none"> </div> <!-- This removes the footer!-->
 
<div class="panel" id="login" data-nav="settings"> </div> <!-- Change the side nav menu -->
 
<div class="panel" id="login" data-tab="settings"> </div> <!-- Change the selected tab to settings -->
 
<div class="panel" id="login" data-defer="app/login"> </div> <!-- Load the login content from the HTTP request of app/login -->
 
<div class="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>
 
<div class="panel" id="loggin" data-unload="showCount" data-counter='3'> </div> <!-- execute showCount when the panel is unloaded -->

 

  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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值