Created
December 21, 2018 19:10
-
-
Save RuslanAsadov/535eef26f1a88f1750df73265dbecf88 to your computer and use it in GitHub Desktop.
hover_element (element__block--hover).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('element').hover(function() { //Когда наводим курсор | |
ths = $(this); | |
lnk = ths.closest('element').find('element__hover-block'); | |
lnk.addClass('element__hover-block--hover'); | |
}, function() { //Обратная функция (Когда убираем курсор) | |
lnk.removeClass('element__hover-block--hover'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment