• Stars
    star
    145
  • Rank 254,144 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 13 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A barebones, flexible jQuery popup plugin. Designed for developers, it's simple to use but very powerful.

Popup.js


A barebones, flexible jQuery popup plugin. Designed for developers, it's simple to use but very powerful.


Features

  • Barebones - it only has what it absolutely needs, the rest is up to you
  • Automatically detects images, external sites, inline content and ajax content
  • It can also cope with raw HTML, functions, jQuery...
  • Plus custom content types. (Think YouTube, Vimeo etc.)
  • Lightweight - ~1.7kb minified and gzipped
  • Made to be customized - callbacks and options aplenty
  • Fully styled with CSS, make it look however you want
  • Handles loading errors intelligently

Installation

Place /assets/css/popup.css in /your/css/folder/.

Add this just before your closing head tag:

<link rel="styesheet" href="/your/css/folder/popup.css">

Then, place /assets/js/jquery.popup.min.js in /your/js/folder/.

Add this just before your closing body tag, after you've included jQuery:

<script src="/your/js/folder/jquery.popup.min.js"></script>

Usage

Set up your html:

<a href="http://placehold.it/350x175.png" class="popup">Popup link</a>

Call the plugin:

var options = {};
$('a.popup').popup(options);

Documentation

For full documentation, have a look at http://docs.toddish.co.uk/popup.