NO CSS!
Required
- jQuery (1.2.6 or higher)
- jquery.joverlay.js (4.0kb, Source Code)
- jquery.joverlay.min.js (2.4kb, Minified for production)
- jquery.joverlay.pack.js (2.4kb, Pack for production)
Current Release: v.0.6
Browser Compatibility
jOverlay has been tested successfully in the following browsers with Javascript enabled:- Firefox 3+
- Internet Explorer 6+
- Safari 2+
- Opera 9+
- Chrome 1+
Examples
Includes
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.joverlay.min.js"></script>
Default options
$.fn.jOverlay.options = {
method : 'GET',
data : '',
url : '',
color : '#000',
opacity : '0.6',
zIndex : 9999,
center : true,
imgLoading : '',
bgClickToClose : true,
success : null,
timeout : 0
};
Usage
BOX 1
$('#box1').jOverlay();$('#box1').jOverlay({color:'green', opacity : 0.9});
BOX 1 DEMO press ESC to close
BOX 2 + AJAX + NO BG CLICK TO CLOSE
$('#box2').jOverlay({url:'teste.html', bgClickToClose : false});
BOX 2 DEMO AJAX
AJAX + LOADING
$().jOverlay({url:'teste2.html', imgLoading : 'ajax-loader.gif'});
BOX1 + SUCCESS + HTML
$('#box1').jOverlay({success:function(html){ alert(html);}});
AJAX + SUCCESS + RESPONSETEXT
$().jOverlay({
url:'teste2.html'
,imgLoading : 'ajax-loader.gif'
,success:function(resp){
alert(resp);
}
});
BOX 1 + Timeout (auto-close)
Time in millis to wait before auto-close.
Set to 0 to disable.
$('#box1').jOverlay({timeout:2000});
Support
Support is available through the email : alvarolimajr [at] gmail [dot] com
Credits
Written by Alvaro Junior