ay', 'none') $('#matchOne-lx').prev('ul').children('li:nth-of-type(2)').addClass('matchOneActive') $('#matchOne-lx').prev('ul').children('li:nth-of-type(2)').css('margin', '0 42px') $('#matchOne-lx').prev('ul').children('li:last-of-type').css('margin', '0 42px') $('#matchOne-sp').css('display', 'block') } var matchTwo = $('#matchTwo-lx').children('a').children('div') if (matchTwo.length == '0') { $('#matchTwo-lx').prev('ul').children('.matchTwoActive').css('display', 'none') $('#matchTwo-lx').css('display', 'none') $('#matchTwo-lx').prev('ul').children('li:nth-of-type(2)').addClass('matchTwoActive') $('#matchTwo-lx').prev('ul').children('li:nth-of-type(2)').css('margin', '0 42px') $('#matchTwo-lx').prev('ul').children('li:last-of-type').css('margin', '0 42px') $('#matchTwo-sp').css('display', 'block') }