Last active
June 21, 2019 07:15
-
-
Save Padilo300/f06bfada2ab6821b3fa5885cff1b7b86 to your computer and use it in GitHub Desktop.
js ссылка
This file contains hidden or 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
<span class="dataLink" data-link="https://google.com/"> | |
link | |
</span> | |
$('.dataLink').on('click', function(){ | |
var link = $(this).attr('data-link'); | |
window.location.href = link; | |
// window.open(link); в новой вкладке | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment