JSFiddle - React, Tailwind, and code Playground
HTML
<body class="home someotherstuff">
<div id="mobilemenu"></div>
</body>
JavaScript
if ($("body").hasClass("home") == true) {
("#mobilemenu").html("<a href="#">Alle Kategorien- HOME</a>");
}
else {
("#mobilemenu").html("<a href="#">NOT HOME</a>");
}