Demos
1. INCLUDE CSS AND JS FILES
<link href="/jeegoopopup/skins/blue/style.css" rel="Stylesheet" type="text/css" />
<script type="text/javascript" src="/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="/jeegoopopup/jquery.jeegoopopup.1.0.0.min.js"></script>
2. HTML
<a href="dog.jpg" class="popup"><img src="dog.jpg" style="width:100px"/></a>
3. JAVASCRIPT
$(function()
$('a.popup').click(function(e)
$.jeegoopopup.open(
html: '<img src="' + $(this).attr('href') + '" />',
skinClass: 'jg_popup_basic',
resizable: false,
draggable: true,
fixed: false
);
$('#jg_popup_content').unbind('click.close').bind('click.close', function()
$.jeegoopopup.close();
);
return false;
);
);
- Open a popup by calling
$.jeegoopopup.open(options);
where options is an object which can be configured with properties and callbacks. - Close a popup by calling
$.jeegoopopup.close(arguments);
Arguments passed to the close method are passed to the onClose callback of the topmost popup. - A (new) popup can be opened or closed from within (same domain) iframes by callingwindow.parent.$.jeegoopopup.open(options); or window.parent.$.jeegoopopup.close(arguments);
Jeegoo - Flexible lightweight popup plugin
No comments:
Post a Comment