or better,:
<div role="alert" id=motd></div>
<script> $(document).ready(function() { $.get("/motd.json",function(data) { var el = document.getElementById("motd"); var offset = 80 + data.length * 20; data.forEach(function(item) { el.innerHTML += "<p>" + item.msg + "</p>"; $(".login").css("top",offset.toString() + "px"); $("#motd").addClass("alert alert-success"); }); }) }); </script>
so it doesn't show if there is no motd.
or better,:
<div role="alert" id=motd></div>
<script> .ready( function( ) {
$.get( "/motd. json",function( data) { getElementById( "motd") ;
data. forEach( function( item) {
el.innerHTML += "<p>" + item.msg + "</p>";
$(". login") .css("top" ,offset. toString( ) + "px");
$("# motd"). addClass( "alert alert-success");
$(document)
var el = document.
var offset = 80 + data.length * 20;
});
})
});
</script>
so it doesn't show if there is no motd.