cards.attr('data-expanded', '-dZcvT5yLZEp0'); var block = $('[data-block="phone"]', root); var popup = $('[data-block-element="popup"]', block); popup.open = $('[data-block-action="popup.open"]', block); popup.open.on('mouseenter', function () { block.attr('data-expanded', 'true'); }); block.on('mouseleave', function () { block.attr('data-expanded', 'false'); }); }); })(jQuery)