Coder Social home page Coder Social logo

dxhtml / jquery-popdown Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wixel/jquery-popdown

1.0 1.0 0.0 282 KB

A super simple jQuery popdown plugin

Home Page: http://wixel.github.io/jquery-popdown/

License: MIT License

CSS 52.95% HTML 27.30% JavaScript 19.74%

jquery-popdown's Introduction

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.

jquery-popdown's People

Contributors

kamaroly avatar nicovanzyl avatar sn avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.