From d5f4539e7ab6cb00513cd428b6ab08c67ddd6bc9 Mon Sep 17 00:00:00 2001 From: maike Date: Tue, 1 Sep 2026 22:40:10 +0500 Subject: Header with a interactive brand text --- js/main.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 js/main.js (limited to 'js') diff --git a/js/main.js b/js/main.js new file mode 100644 index 0000000..b96513b --- /dev/null +++ b/js/main.js @@ -0,0 +1,10 @@ +// brand letters' rotation +function rotate(letter) { + return String.fromCharCode( + letter.charCodeAt(0) + (letter.toLowerCase() <= 'm' ? 13 : -13) + ); +} + +$(".header .brand .letter").hover(function () { + $(this).text(rotate($(this).text())); +}); -- cgit v1.3