Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide a single button in div

I want to hide a single button in many buttons in div by using button name. Is that possible?
I tried

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

But it deletes all buttons in that div.

like image 905
vivek Avatar asked Mar 22 '23 07:03

vivek


1 Answers

Change

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

to

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

if input is inside #showButtons

like image 146
Anton Avatar answered Apr 02 '23 12:04

Anton