jQuery Pop-up – Facebox

My new favorite jQuery pop-up plugin is facebox. It gives a Facebook style pop-up box and it’s REALLY easy to use.

Basically, just include the CSS and JS files in your web page and one or two lines of jQuery code at load, then any anchor tag can create a pop-up box.

The jQuery code:

jQuery(document).ready(function($) {
  $('a[rel*=facebox]').facebox()
})

Then I can use the anchor tag like this:

<a href="#div_id" rel="facebox">click here</a>

It can’t get much easier than that!

You can find out more about the plugin here.

Did you like this? Share it:
This entry was posted in Easy, jQuery and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>