robertgaal / facebox-for-prototype Goto Github PK
View Code? Open in Web Editor NEWAn implementation of Chris Wanstrath's Facebox for the Prototype JS framework
An implementation of Chris Wanstrath's Facebox for the Prototype JS framework
Facebox for Prototype, version 2.0 By Robert Gaal - http://wakoopa.com -------------------------------------------------------------------------- Heavily based on Facebox by Chris Wanstrath - http://famspam.com/facebox First ported to Prototype by Phil Burrows - http://blog.philburrows.com Licensed under the MIT: http://www.opensource.org/licenses/mit-license.php Need help? Join the Google Groups mailing list: http://groups.google.com/group/facebox/ -------------------------------------------------------------------------- Dependencies: prototype & script.aculo.us + images & CSS files from original facebox Usage: Append 'rel="facebox"' to an element to call it inside a so-called facebox. You can also call it directly through the following code: facebox.loading(); facebox.reveal('Facebox contents here', null); new Effect.Appear(facebox.facebox, {duration: .3});
Just wanted to mention that I was having trouble getting facebox to work on links that were dynamically inserted with javascript.
So for example if I did:
page.insert_html :top, 'some-div', :partial => "new_link"
that link wouldn't work until I refreshed the page.
The solution was to call the watchClickEvents() again every time after I added new links, like this:
page.insert_html :top, 'some-div', :partial => "new_link"
page << "facebox.watchClickEvents();"
Hope it helps...
Is there anything I can do to disable a facebox window from unexpectedly closing when a user clicks outside of the window?
This is awesome by the way! Was looking for something this like this for a while so I wouldn't have to include jquery just for a nice text box!
One thing I was wondering: has anyone gotten this to work with a greyed out background? This would give it a more model appearance, which is useful at times. I tried playing with the overlay related css properties and adding various background/z-index properties, but couldn't get it to set any background page wide. Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.