SHARE
TWEET

Untitled

a guest Aug 25th, 2019 115 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $scope.showHotelRoomPicBigMouseOver = function (e) {
  2.     tmpTimer = setTimeout(function () {
  3.         var t = e.target;
  4.         var off = $(t).offset();
  5.         var $tooltip = "<div id='tooltip'>< img src='"+t.src+"' width='100px' height='100px'></div>";
  6.         $("body").append($tooltip);    //添加到页面中
  7.         $("#tooltip").css(
  8.             {
  9.                 "top":off.top,
  10.                 "left":off.left + 30 + "px",
  11.                 "position":"absolute"
  12.             }).show("fast");   //设置x坐标和y坐标,并显示
  13.     }, 100);
  14. }
  15.  
  16. $scope.showHotelRoomPicBigMouseLeave = function (e) {
  17.     this.title = this.Mytitle;
  18.     $("#tooltip").remove();    //将该div移除
  19.     clearTimeout(tmpTimer);
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top