本文目录

插件 jQuery.Popdown 中文API文档

🌙
手机阅读
本文目录结构

插件 jQuery.Popdown 中文API文档 https://github.com/Wixel/jquery-popdown jQuery Popdown Plugin

What is a popdown? It’s a simple dialog that pops down from the top of your browser window once it’s loaded HTML in the background. A simple way to load web forms, content, user feedback messages, media and any other in place style content.

It’s lightweight (4kb) and fast, take a look at the demo’s: http://wixel.github.io/jquery-popdown

How to use it

  1. Add the jquery.popdown.css file to your page.
  2. Add the images inside the img to your images directory.
  3. Add the jquery.popdown.js file to your page.
  4. Make sure jQuery is already included in your page.
  5. Add links to your page and set their href attributes to the pages you want loaded in the Popdowns.
  6. Add class="popdown" to the links you added in step 4.
<a href="/pages/image.html" width="660" class="popdown btn" title="Grumpy Demo">Grumpy Demo</a>
<a href="/pages/youtube.html" class="popdown btn" title="Youtube Demo">Youtube Demo</a>
<a href="/pages/content.html" class="popdown btn" title="Content Demo">Content Demo</a>	
  1. Add the following code:
$(document).ready(function(){
  $('.popdown').popdown();
});

You can also specify the width of the popdown dialog:

$(document).ready(function(){
  $('.popdown').popdown({width:700});
});

Nuts and Bolts

You can buttons (or other elements) that can automatically close the popdown dialog by simply adding: class="close-popdown" to the element inside your popdown content. example :

 <a href="#" class="close-popdown">Close</a>

You can fully style the underlying dialog by adjusting the jquery.popdown.css or even better, the jquery.popdown.less file.

License

The MIT License (MIT)

Copyright (c) 2014 Wixel Development Team

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

AXIHE / 精选资源

浏览全部教程

面试题

学习网站

前端培训
自己甄别

前端书籍

关于朱安邦

我叫 朱安邦,阿西河的站长,在杭州。

以前是一名平面设计师,后来开始接接触前端开发,主要研究前端技术中的JS方向。

业余时间我喜欢分享和交流自己的技术,欢迎大家关注我的 Bilibili

关注我: Github / 知乎

于2021年离开前端领域,目前重心放在研究区块链上面了

我叫朱安邦,阿西河的站长

目前在杭州从事区块链周边的开发工作,机械专业,以前从事平面设计工作。

2014年底脱产在老家自学6个月的前端技术,自学期间几乎从未出过家门,最终找到了满意的前端工作。更多>

于2021年离开前端领域,目前从事区块链方面工作了