Hide HTML Button before page load in jQuery

Last Reply one month ago By dharmendr

Posted one month ago

How to hide an HTML Button before the page loads using jQuery

Posted one month ago

Hi sathya2496,

Set the html button style attribute to display none. 

Then in document ready function show the button.

Check this example. Now please take its reference and correct your code.

HTML

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#btnSave").show();
        });
    </script>
</head>
<body>
    <button id="btnSave" type="button" style="display: none;">Save</button>
</body>
</html>

Demo