Tag Archives: jQuery

jquery.tent for Simple Popups

I created a new jQuery plugin for handling simple pop-ups.  The plugin is called jquery.tent.  It is available here (https://github.com/danielbank/jquery.tent).  It is based off a tutorial by Keith Wood for making jQuery plugins (http://keith-wood.name/pluginFramework.html).  I highly recommend this tutorial because it explains things quite well and the code itself is really well written.

Usage of jquery.tent is simple:

1. Initialize a DOM element as a tent.



2. Set the tent options to control the location where the popup is shown.

$("#pop-up").tent('option', {left: 0, top: 0});


3. Show the pop-up.



4. Hide the pop-up.