各种JS frameworks的性能测试: http://experiment.bcse.info/slickspeed/
测试下来显示peppy的选择器速度最快.
以下方法可将peppy设为jquery的选择器:
<html> <head> <script src="jquery.js"></script> <script src="peppy.js"></script> <script type="text/JavaScript"> jQuery.find = peppy.query; $('.example').each(function(){ ... }); </script> </head> <body> <div class="example"> example 1 </div> <div class="example"> example 2 </div> <div class="example"> example 3 </div> </body> </html> |