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();
}
);
精彩评论