社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
$('td').hover(function() {
// 鼠标移入时添加hover类
// code
}, function() {
// 鼠标移出时移出hover类
//code
});
$('td').hover(function() {
// 鼠标移入时添加hover类
var index = $(this).data('id');
hoverItem(index)
}, function() {
// 鼠标移出时移出hover类
});
function hoverItem(index){
$('#started'+index).hover(function() {
// 鼠标移入时添加hover类
$('#started'+index).removeClass('btn-gray')
$('#started'+index).addClass('btn-red')
$('#started'+index).text('停止')
}, function() {
// 鼠标移出时移出hover类
$('#started'+index).removeClass('btn-red')
$('#started'+index).addClass('btn-gray')
$('#started'+index).text('已启动')
});
}
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!