First look at the window effect, as follows:
Enlarge the picture $ (page). On (' click ', '. Popupimage img ', function () {var-= $ (this);
That.popupimage ({this:that, Width: "200px"})});
Album Pinball Window $.fn.popupimage = function (obj) {var $this = obj.this;
var sj_w = $this [0].naturalheight;
var src = $this. attr (' src ');
var h = $ (' body '). Height ();
var w = $ (' body '). width ();
var padding = 10;
var shadew = w-padding*2;
var img = ', shade = '; img = ' <div class= ' popup-image ' style= ' position:absolute; top:0; left:0; z-index:999999; padding:10px ' +padding+ ' px; Width: ' +w+ ' px; Height: ' +h+ ' px; Line-height: ' +h+ ' px;
Text-align:center "> ' + ' </div> '; Shade = ' <div class= ' shade ' style= ' position:absolute; top:0; left:0; Width: ' +w+ ' px; Height: ' +h+ ' px;background: #000; z-index:999990; Opacity:. 8; "
></div> ';
$ (' body '). Append (shade);
$ (' body '). Append (IMG); $ ('. Popup-image '). On (' click ', Function () {$ ('. Popup-imagE '). Remove ();
$ ('. Shade '). Remove ();
})
};
The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.