How to implement the Ez Overlay lightbox:
- Copy the code for this example into the WordPress editor in the HTML window or start from scratch and go to step 2.
- Create an Ez Overlay Div element by assigning it a with the class=”ez-overlay”, to avoid css conflicts add your target div to the body of your html and not within a sidebar or another div.
- Assign the new Div a unique CSS Id so it can be activated by the trigger. Ie: id=”my-overlay”.
- Put whatever Html content within the Ez Overlay Div.
- Create a trigger for the overlay, it can be just about any Html element but needs an ‘onlclick’ attribute to activate the lightbox. See the ezFade() function below.
- Ie7 will render text elements within this overlay at a different size than Ie8. If this is an issue, just assign a width and height to your Ez Overlay target div using an inline style.
- Avoid padding or adding margins to the Ez Overlay target div. Padding adds to a div’s width and height and will throw your overlay off-center. Just add a margin to the elements within the target div instead.
- In the folder named ‘uncompressed-js’, there is a file named ‘ez-overlay.js’ which is a readable copy of the compressed code for tinkering.
- The plugin removes the overlay div’s from the dom when you exit out of them, this is so that .swf playback will be halted on all browsers. Don’t panic, the plugin immediately returns them to the body of your html document at the very end.
The ezFade() function accepts five arguments, the first being the target lightbox to be triggered, the second is the fade time. The third argument is to activate "fixed mode", and finally the x/y coordinates if you want you overlay to be fixed in a certain position.
- Upload the entire ‘ez-overlay’ folder to the
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Create your overlay’s and triggers with html using the examples included in the plugin folder.
- Example overlay div to be put in the body of your html:
<div id="my-overlay1" class="ez-overlay"><h2>Ez Overlay</h2></div>
- Example trigger to be put anywhere in your html code:
<span style="cursor:pointer; color:#036;" onclick="ezFade('my-overlay1');">Open Overlay1</span>
Nu există nicio verificare pentru acest modul.
Contributori și dezvoltatori
„Ez Overlay” este un software open-source. La acest modul au contribuit următoarele persoane.Contributori
Tradu „Ez Overlay” în limba ta.
Te interesează dezvoltarea?
Răsfoiește codul, vezi depozitarul SVN, sau abonează-te la jurnalul de dezvoltare prin RSS.
- Hello WordPress World!