This plugin provides PHP function
jquery_lightbox($selectors)
, which generates all needed JS code for calling jQuery lightBox.
For example:
<?php jquery_lightbox('a img.lightbox'); ?>
will generate this code:
<script type="text/javascript"> jQuery(document).ready(function() { jQuery('a img.lightbox').lightBox({ imageLoading: 'http://www.example.com/wp-content/plugins/jquery-lightbox-api/images/lightbox-ico-loading.gif', imageBtnClose: 'http://www.example.com/wp-content/plugins/jquery-lightbox-api/images/lightbox-btn-close.gif', imageBtnPrev: 'http://www.example.com/wp-content/plugins/jquery-lightbox-api/images/lightbox-btn-prev.gif', imageBtnNext: 'http://www.example.com/wp-content/plugins/jquery-lightbox-api/images/lightbox-btn-next.gif', imageBlank: 'http://www.example.com/wp-content/plugins/jquery-lightbox-api/images/lightbox-blank.gif' }); }); </script>
So you will just simply call PHP function
jquery_lightbox()
and you don't need to take care about all the pats, or including and uploading anything else.
Plugin is bundled with all need jQuery lightBox files and it will take care about including them...
Also multiple selectors in format
jquery_lightbox(array('selector1', 'selector2', ...))
are supported.