I want to load http://yahoo.com in a modal window on my website. Can some one suggest me any jquery based modal plu开发者_JAVA技巧gin for it.
Thanks in advance
This site has a comprehensive list : http://planetozh.com/projects/lightbox-clones/
Just filter out the ones that use jQuery and support iFrames. Fancybox and jquery UI comes to mind.
lets assume you have an image and its title contains link you want to open in dialog.
<img title="link.html" class="linkimage">
$(".linkimage").click(function() {
var $this = $(this);
var horizontalPadding = 10;
var verticalPadding = 10;
$('<iframe class="externalSite" src="' + this.title + '" />').dialog({
title: 'HTS',
autoOpen: true,
width: 800,
height: 700,
modal: true,
resizable: true,
autoResize: true,
overlay: {
opacity: 0.5,
background: "black"
}
}).width(800 - horizontalPadding).height(500 - verticalPadding);
});
精彩评论