jquery文档modal

    技术2022-07-11  140

    jquery文档modal

    My jQuery knowledge isn't quite to the level of my MooTools so I rely quite a bit on the jQuery documentation. When I look at articles with jQuery code in them, I'll periodically see functions I hadn't seen before and want to learn more about. What's annoying is bringing up a new tab and navigating to the docs. I've created a JavaScript favelet/bookmarklet that does that for me.

    我对jQuery的了解还不及MooTools,因此我相当依赖jQuery文档 。 当我查看其中包含jQuery代码的文章时,我会定期看到以前从未见过的功能,并希望了解更多信息。 烦人的是弹出一个新标签页并导航到文档。 我创建了一个JavaScript favelet / bookmarklet来为我完成此任务。

    All you need to do is highlight the code, click the favelet, and the search is done for you!

    您所需要做的就是突出显示代码,单击favelet,然后为您完成搜索!

    View Demo 查看演示小 Favelet 工具

    JavaScript (The JavaScript)

    (function(){var d=document,w=window,ds=d.getSelection,ws=w.getSelection,ss=d.selection,e=encodeURIComponent;t=(ws)?ws():(ds)?ds():(ss)?ss.createRange().text:'';t=(t.toString().length)?t:prompt('Please select the code or type the term you would like to research.','');if(t){a='http://api.jquery.com/?s=';u=a+e(t);f=function(){x=w.open(u,'nfx','scrollbars=1,toolbar=0,resizable=1,status=1,width=600,height=600');if(!x)w.location.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(f,0);else f();}})();

    Don't worry about the mess of code...it works!

    不用担心代码混乱……它起作用了!

    View Demo 查看演示小 Favelet 工具

    All you need to do is drag the favelet to your bookmarks/favorites toolbar and you can use it on any website! Check out the demo to test it out.

    您需要做的就是将小工具拖到书签/收藏夹工具栏上,您可以在任何网站上使用它! 查看演示进行测试。

    翻译自: https://davidwalsh.name/jquery-bookmarklet

    jquery文档modal

    相关资源:jQuery EasyUI API 中文文档 – Dialog对话框
    Processed: 0.010, SQL: 9