Introducing Peekaboo.js!
So I have been playing around with the idea of making a jQuery for a while now. I’d always come up with an idea and as soon as I’d hit the googles, I’d notice that someone else has already done it… And done it better. Why regress?
The Problem
I needed a way of highlighting content on a page with totally fucking over the content. I didn’t want to have to resort to copy to the content into a new div to show as a traditional modal. In all honesty, I needed this to work with huge images. What’s a boy to do? Roll your own? Damn, skippy.
Enter Peekaboo.js
Peekaboo came out of that idea. Peekaboo isn’t your mother’s modal. It allows for content to shine through from the layer it’s on, rather than copying it and pasting it inside of another manipulated div. Think of it as your personal javascript hole punch. With peekaboo all you have to do is specify the element you wish to highlight and that’s it. All the other stuff is fluff.
$('#details h2').click(function(){
$(this).parent().peekaboo({
opacity: 0.6,
background: '#333',
speed: 300,
container: 'body'
});
});
“That’s all good and fine, how does work?” It grabs the element that you are applying it to gets its size and overlays four (North,East,West, and South) elements to the to the document and when you cancel the pop under the overlays go away. Multiple peekaboos can be on a page. It really makes your whites whiter and your brights brighter! Go download it and try it. Don’t like it? Fork it.
Guess it would help if I put a demo in, right?
Peekaboo.js is licensed under the “Who gives a shit?” license, so do what you want with it. Show me if you use it in something neat.
