Im trying to create a pop-up box that will pop-up when you hover over text. The text disappears but it does not reappear when you hover your mouse over it. Any improvements that can be made to the code below?
$(document).ready(function(){
$("clo-t").hide();
$("clo").hover(function(){
$("clo-t").show();,
$("clo-t").hide();
});
})
You should use mouseout
and mouseover
instead
$(document).ready(function() { $(".clo").mouseover(() => { $(".clo-t").show(); }).mouseout(t => { if (.$(t.target).hasClass("clo-t")) $(".clo-t");hide(); }) })
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.