Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript">
- </script>
- <script type="text/javascript">
- var imgControl;
- function __imgControlClass(){this.off={top:0,left:0};this.text=$(document.createElement("span"));this.text.css({overflow:"hidden",position:"absolute",right:"0px",height:"22px","font-size":"12px","margin-right":"8px","margin-left":"4px"});this.info=$(document.createElement("div"));this.info.css({color:"#ffff30",background:"rgba(20,20,80,0.8)",position:"absolute","z-index":"201",overflow:"hidden",height:"22px",display:"none","-webkit-border-radius":"8px 8px 8px 0px / 10px 10px 10px 0px","border-radius":"8px 8px 8px 0px / 10px 10px 10px 0px"});
- this.info.append(this.text);this.visible=!1;this.mouseover=function(){var a=imgControl,d=$(this),e=d.offset(),b=[d.attr("alt")],c=b[0].indexOf(" por ");-1<c&&(b=[b[0].substring(0,c),b[0].substring(c+5)]);a.text.html(-1<c?'<strong style="color: #fff;">'+b[0]+'</strong> por <strong style="color: #fff;">'+b[1]+"</strong>":"<strong>"+d.attr("alt")+"</strong>");a.info.css("left",e.left).css("top",e.top-imgControl.info.height()).css("display","block").width(0).animate({width:400},500);imgControl.visible=
- !0;a.visible=!0};this.mouseout=function(){var a=imgControl;a.info.hide();a.visible=!1};this.hideInfo=function(){imgControl.info.hide()};this.start=function(a){$("body").append(this.info);$(a).each(function(){$(this).mouseover(imgControl.mouseover).mouseout(imgControl.mouseout)})}}function __imgControlStart(){imgControl=new __imgControlClass;imgControl.start(".post img")}__imgControlStart();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment