With jQuery you can:
$('element').css('display', 'none|block');
With pure Javascript you can:
document.querySelector('element').style.display = 'none|block';
Note that in jQuery you can use hide() and show() or to modify directly the css value within any value you want, the difference is that hide() is equivalent to display: none and show() could be equivalent to display: block, if you'd like to set properties like inline, inline-block, flex, table, etc. you should use the jQuery element.css.
Check this playground:
let el = $('.hallo');
$('.hide').click(function() {
el.hide();
});
$('.show').click(function() {
el.show();
});
$('.css').click(function() {
el.css('display', $('.prop').val());
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<h1 class="hallo">Hallo</h1>
Set the display value <input type="text" name="prop" class="prop">
<br><br>
<button class="hide" type="submit">jQuery hide()</button>
<button class="show" type="submit">jQuery show()</button>
<button class="css" type="submit">jQuery css()</button>
display: none, then toggled that class it would work.$("#your-button").hide()sets the style tostyle="display: none;". Similarly,$("#your-button").show()removes that style.