a quick javascript lightbox

I had to develop some feature which required some javascript lightbox,
I really not needed a fancy one, but a small or medium one
it was for some small confirmation and in addition a couple of inputs on confirmation
so you can imagine a small html form being poped up
I had to add one then, and I guessed tomorrow there might be couple of more coming

I found very nice options when googled
but I thought of implementing one of my own just for fun, and I got this a quick one

admin.lightbox.show(
  html: "my html goes here"
  title: "my title"
).done(->
  alert "Am done"

hi there

And it really took a very less time to build this one as follows

The most interesting part here is to be able to define callbacks like done and cancel.

And I welcome all suggestions :)

About these ads

3 thoughts on “a quick javascript lightbox

  1. Hey, the way the scripts are here it just doesn’t work.. :/
    The coffescript is using “#admin_lightbox” as id for the lightbox but the css contains “#admin_layout”, but there’s no elements with this identifier. Changing the “#admin_layout” to “#admin_lightbox” on css just made it work! :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s