
Show HN: Zerobox – a small lightbox - kolodny
https://github.com/kolodny/zerobox
======
Timelord
Nice, nice. Simple, light. Just wondering what the license is. As it is (No
license), standard copyright applies. I'd rather see something like BSD or
GPL.

~~~
nyordanov
Here's what I started using recently (MIT):
<http://dimsemenov.com/plugins/magnific-popup/>

------
markdown
Make it work with zepto instead of jquery, and move most of it into a CSS
file, and you'll be golden :)

------
stephenhuey
Your lightbox is fine on my iPhone, but can anyone tell me what's going on
with the DEMO link on the Github page? I can't get it to open with a tap from
either Safari or Chrome on my iPhone. Do you think Modernizr is doing
something weird with that hyperlink on mobile?

------
sksksk
Pretty cool, but is there any need to use jQuery?

You could have achieved the same with vanilla JS and CSS transitions

~~~
hnriot
this has been debated endlessly, the use of jQuery is not an issue. An
abstraction layer like jQuery buffers the code from browser differences and
since it's almost always already in the user's cache and nearly always used
for anything non trivial, it's overhead is minimal both from a networking
point of view and code path.

~~~
steven5158
Well, I have actually been going through many lightbox clones lately and
almost all have a dependency on jQuery. The problem lies in when you are
trying to inject a lightbox into a page you are not the creator of and they
are using a very old outdated jQuery, causing conflicts. (When used for making
browser extensions etc). This would be perfect for me if it was not dependent
on jQuery and loaded iFrames and inline html (other options out there are
bloated and outdated), but regardless, awesome job and thank you for the
contribution :)

------
stevenleeg
Looks good! It's small, simple, and does exactly that it should.

I was happy to see that the use of jQuery animations worked fine on my iPhone
as well (I was expecting it to be choppy due to the lack of CSS animations).

Awesome work!

~~~
brickmort
worked on my android device as well. neat!

------
hnriot
This might make sense to be added to Bootstrap.

------
smcl
Looks like it only works for images, is this intended?

~~~
kolodny
Yes, that's the most common usage for this type of thing.

------
itry
Using my ipad, nothing happens when i click on "demo".

~~~
adventureloop
Chrome on my iPad, the demo button doesn't do anything. When I long press and
'Open in new Tab' the demo page opens.

------
factorialboy
Tabs for indentation and not spaces =/

~~~
rehashed
Maybe he just wanted to follow jQuery convention for a jQuery plugin?

<http://contribute.jquery.org/style-guide/js/>

> Indentation with tabs.

