I’m trying to use jQuery to show an image that I have set to display: none. I run the code server side, but do not see the image after the page renders. Can someone show me where I need to fix my code to show an image that initially is set to display: none? There are many icons I’m trying to show, so I’m trying to use the class property of jQuery to do this. I am using a master page if that matters.
Server Side Code:
Page.ClientScript.RegisterStartupScript(typeof(Page), "showEditIcons", "$('.editIcon').css('display', 'block';", true);
HTML:
img id="describeProcessQ" src="assets/images/edit_icon.gif" class="editIcon" style="display: none;" alt="Describe process comments" />
Try
$('.editIcon').show();instead to display the image.