the button in TopBar works well. I want to hide the side-nav too, but both doesn´t work together so either I hide the side-nav or I show the button in TopBar. Any reason for this?
In the flow are both ui_templates
`
[{"id":"d13e291a.c98c5","type":"ui_template","z":"920bd247.0b5318","group":"79d56da6.863e74","name":"Sidebar verstecken","order":11,"width":0,"height":0,"format":"\n<script>\n $(\"md-sidenav\").hide();\n $(\"md-toolbar button\").hide(); \n</script>\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"global","x":550,"y":340,"wires":[[]]},{"id":"5861b889.53e738","type":"ui_template","z":"920bd247.0b5318","group":"24f6ffb4.136468","name":"TopBar","order":1,"width":0,"height":0,"format":"<script id=\"clockScript1\" type=\"text/javascript\">\n var home = new Object();\n home.payload = 'Home';\n var language= new Object();\n language.payload = 'change';\n var theScope = scope;\n var clockInterval;\n $(function () {\n if (clockInterval) return;\n/*\n //add logo\n var div1 = $('<div/>');\n var logo = new Image();\n\n logo.src = '/wieland_logo.jpeg'\n logo.height = 45;\n div1[0].style.margin = '10px auto';\n\n div1.append(logo);\n*/\n //add clock\n var div2 = $('<div/>');\n var p = $('<p/>');\n\n div2.append(p);\n div2[0].style.margin = '5px';\n \n\n function displayTime() {\n p.text(new Date().toLocaleString());\n }\n \n clockInterval = setInterval(displayTime, 1000);\n\n // add Text\n var div4 = $('<div/>');\n var t = document.createTextNode(\"TRAINING\"); // hier den Title eingeben\n div4.append(t)\n div4[0].style.margin = '40px auto';\n div4[0].style.size = '40';\n \n // add button\n var div3 = $('<div/>');\n var button = document.createElement(\"BUTTON\");\n var b = document.createTextNode(\"Home\")\n //var logo = new Image();\n //logo.src='/sprache.png';\n //logo.height=45;\n //button.appendChild(logo);\n button.height=45;\n //button.left=50; \n button.appendChild(b);\n button.addEventListener(\"click\", doIT.bind(null, home));\n div3.append(button);\n \n //var div5 =$('<div/>');\n //var taster = document.createElement(\"Button\");\n //var pic = new Image();\n //pic.src = \"/home.png\";\n //pic.height=45;\n //taster.appendChild(pic);\n //pic.addEventListener(\"click\", doThis.bind(null,language));\n //div5.append(taster);\n \n //add to toolbar when it's available\n var addToToolbarTimer;\n \n function addToToolbar() {\n var toolbar = $('.md-toolbar-tools');\n \n if(!toolbar.length) return;\n //toolbar.append(div5);\n toolbar.append(div4);\n //toolbar.append(div1);\n toolbar.append(div3);\n toolbar.append(div2)\n clearInterval(addToToolbarTimer);\n }\n addToToolbarTimer = setInterval(addToToolbar, 100);\n \n function doIT(m){\n theScope.send(m);\n }\n \n function doThis(m){\n theScope.send(m);\n }\n });\n \n</script>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":380,"y":340,"wires":[[]]},{"id":"79d56da6.863e74","type":"ui_group","z":"","name":"Buttons","tab":"aea44e8c.a6024","order":1,"disp":true,"width":"6","collapse":false},{"id":"24f6ffb4.136468","type":"ui_group","z":"","name":"TopBar","tab":"8e0f7752.ff481","order":13,"disp":false,"width":"1","collapse":false},{"id":"aea44e8c.a6024","type":"ui_tab","z":"","name":"Ausgänge","icon":"<i class=\"fa fa-lightbulb-o\" aria-hidden=\"true\"></i>","order":13},{"id":"8e0f7752.ff481","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1}]
`