How to hide one button in a div

I want to hide one button on many buttons in a div using the button name. Is it possible?
I tried

$("#showButtons").hide('input[name:buttonName]'); 

But it removes all the buttons in this div.

+4
source share
5 answers

Edit

 $("#showButtons").hide('input[name:buttonName]'); 

to

 $("#showButtons input[name='buttonName']").hide(); 

if the input is inside #showButtons

+5
source

You are looking for:

 $("input[name=buttonName]").hide(); 

Or hide the buttons found in the showButtons div:

 $("#showButtons input[name=buttonName]").hide(); 
+2
source

You specify the class name of the button with the jquery hide function

 <script type="javascript"> $('.button1').hide(); </script> 
0
source

you can use

 $("input[name='myButton']").hide(); 

OR

 $("input[name='myButton']").css({ 'display' : 'none' }); 
0
source

You can use -

 $(document).ready(function(){ $("input[name='sb_Second']").hide(); }); 

To try

0
source

All Articles