Hiding button in JQuery using .prop(hidden: true)
A button does'nt have a hidden property ?
$('button').hide();
or
$('button').toggle(true); //shows button$('button').toggle(false); //hides button
You can use set the display
style to none
. For example,
$("#button").css("display", "none");
Or, .hide()
for brevity,
$("#button").hide()
There's also visibility
and opacity
but these two may not generate the effect you desired.
You can't hide a button using jQuery's .prop()
function, you have to use either .hide() or .fadeOut()
or you can try with .css()
method:
using .css()
:
$('input[submit]').css('display','none');
using fadeOut()
:
$('input[submit]').fadeOut();
using .hide()
:
$('input[submit]').hide();