UNPKG

wfquery

Version:

like jQuery but just for new browser

39 lines (36 loc) 1.51 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>demo/01.query.html</title> <script src="../wfQuery.js?_t=1516462775018"></script> <!-- <script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script> <script>wfQuery = jQuery</script> --> <style> pre.code{background: #d2d2d2;padding: 4px;} </style> </head> <body> <a href="../index.html">返回首页</a> <h2>wfQuery入口方法与jQuery不同的地方</h2> <ul id="list"> <li>原型对象基于Array对象扩展</li> <li>直接使用querySelectorAll, 不兼容</li> <li>context参数只支持原生单个dom对象,而不支持选择器字符串或者wfQuery对象</li> <li>function参数将直接运行方法</li> <li>em标签 <em>1</em></li> <li>a标签 <a href="">233</a></li> </ul> <script class="code"> console.log( $() instanceof Array ); console.log( $('ul') ); console.log( $('ul em') ); console.log( $('ul > li') ); console.log( $('ul , a') ); console.log( $('.code') ); </script> <a href="https://github.com/shy2850/wfQuery.git" target="_"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"></a> </body> </html>