Last active
April 27, 2023 17:59
-
-
Save fmaylinch/f20ffc90de47d002a22a83707e35b389 to your computer and use it in GitHub Desktop.
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
fade("#title", "Привет!") | |
fade("#text1", "Вот " + link("песня", "https://disk.yandex.ru") + " я написал для тебя") | |
fade("#text2", "Пожалуйста скажи как тебе)") | |
function fade(selector, value) { | |
let elem = $(selector) | |
elem.fadeOut('slow', () => { | |
elem.html(value).fadeIn('slow') | |
}); | |
} | |
function link(text, url) { | |
return `<a style="color:#f79ed1" target="_blank" href="${url}">${text}</a>` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment