Framework7 doesn’t use any third party library, even for DOM manipulation. It has its own custom DOM7 – DOM library that utilizes most edge and high-performance methods for DOM manipulation. You don’t need to learn something new, its usage is very simple because it has the same syntax as well known jQuery library with support of the most popular and widely used methods and jQuery-like chaining.


To start use it there is a Dom7 global window function, but we recommend to assign it to some local variable with more handy name, like $$

官方提供有一个 Dom7 的全局变量,为了方便使用,我们用 $$ 存储到局部变量中。。

//Export DOM7 to local variable to make it easy accessable

var $$ = Dom7;

然后呢就列举了一大堆 Dom7的方法,使用和juqery/zepto是一模一样的。然后踩坑开始了。



$$(‘.toolbar-inner a’).on(‘click’,function(){



// $$(this).siblings().removeClass(‘active’);   注意这里并不支持 siblings()方法








最后做了一个小 demo:





站长QQ:739696033 | 微信:bing-0719:Bcoder资源网 » Framework7初步尝试(一):不支持siblings()

扫描二维码关注微信公众号:“bcoder-cn 声明:本站内容部分来自互联网,仅供交流学习之用,请勿作商业用途,版权归原作者所有。如果有侵犯到您的权益,请提供相关证明联系本站删除,谢谢合作!
赞 (0)
分享到:更多 ()

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址