Satch3000 Satch3000 - 1 year ago 64
Javascript Question

jQuery css() not working with visibility

In the code below I have changed

and modified the visibility. For some reason it doesn't show up onclick.

Here is the HTML:

<td class="area">
<img src="/def.jpg" />

<tr id="target" style="visibility:hidden">
<td>This was hidden</td>

and then the jQuery:

$("td.area").on("click", "img", function(){

Answer Source

Why not just use $('tr#target'). See jsFiddle here.