wednesdayco
2022-02-16 11:34:10 +08:00
这 js 实现的
J_bracketArea.on('mouseover', '.matchteam', function (e) {
var _self = $(this)
_classString = _self.attr('class')
_class = _classString.split(' ')
if (_self.hasClass('team-')) {
return
}
for (var i = 0; i < _class.length; i++) {
var Is_team = _class[i].indexOf('team-')
if (Is_team === 0) {
var team_van = _class[i],
all_team_van = $('.' + team_van),
all_team_line_van = $('.line' + team_van)
all_team_van.addClass('team-match-hover')
all_team_line_van.addClass('linematch')
console.log(all_team_line_van)
stack = stack.add(all_team_van)
linestack = linestack.add(all_team_line_van)
}
$('.team-match-hover').parent().parent().css(moveTop)
}
}).on('mouseout', '.matchteam', function (e) {
$('.team-match-hover').parent().parent().css(moveNoraml)
stack.removeClass('team-match-hover')
linestack.removeClass('linematch')
stack = $()
linestack = $()
})