开发者

Hover Effect,Jquery,what is the error in this jquery?

Hi Friends i was using the following jquery,but it is not gaving an output what is the error in the code?

$('.event').hover(function() {
  $('.popupbox1'开发者_运维技巧).show();
  $('.popupbox1').css({position:'absolute',top: $(this).offset().top - 15 +'px',left: $(this).offset().left + $(this).width() +25 +'px',zIndex:1000});
,function() {
  $('.popupbox1').hide();
});


You had a missing } and the 'px' entries were unnecessary. Give this a shot:

$('.event').hover(
  function() {
    $('.popupbox1').show();
    $('.popupbox1').css({position:'absolute',
                         top: $(this).offset().top - 15,
                         left: $(this).offset().left + $(this).width() + 25,
                         zIndex:1000
                       });
  },
  function() {
    $('.popupbox1').hide();
  }
);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜