Created
May 22, 2019 14:48
-
-
Save csakiistvan/66dc12702e9d31339764fb16ba90c7dc to your computer and use it in GitHub Desktop.
Check the weekend and change the text in 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
$(document).ready(function(){ | |
var date = new Date() | |
var is_weekend = '' | |
if(date.getDay() == 1) { | |
is_weekend = "Today is closed"; | |
} else if (date.getDay() == 2 || date.getDay() == 5) { | |
is_weekend = "Ma nyitva 16:00-ig"; | |
} else { | |
is_weekend = "Ma nyitva 18:00-ig"; | |
} | |
document.getElementById("open-text").innerHTML = is_weekend; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment