Search code examples
javascriptjqueryhtmlimageinvisible

Set images visibility to be false


I have many images that are all part of one class, here is the code:

class='button_cell'

Can I please have some help to set all of these images to not be visible via Javascript?

I use the following code to set all items in a DIV to be disabled:

$('#incident_div').find('input, textarea, button, select').attr('disabled',true);

I am guessing that the code should be similar, yet I am stuck.

May I please have some help with this?


Solution

  • You can select all of the images in the button_cell class using $('.button_cell') and then use the hide() function to hide them all, like so:

    $('.button_cell').hide();