87,904
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
$(document).ready(function(){
$("a").mouseover(function(){
$('.mylightbox').html5lightbox();
});
$("a").mouseout(function(){
$('.mylightbox').html5lightbox();
});
</script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body>
<a href="javascript:;" class="user-select-auto">点击初始化对应链接的html5lightbox()</a>
<a href="javascript:;" class="user-select">html5lightbox()</a>
<script type="text/javascript" src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script>
jQuery(function($){
$('a.user-select-auto').hover(function () {
$(this).css({"background-color":"red"});
},
function () {
$(this).css({"background-color":"blue"});
}
);
$( "a.user-select" ).mouseover(function() {
$( this ).css({"color":"red"});
}).mouseout(function() {
$( this ).css( "color","black" );
});
});
</script>
</body>
</html>