Looking for an JQuery to check for image visibility. The image control is inside a repeater control
<p>What is the eqivalent JQuery for the below?</p>

<pre><code>function ChooseProd(obj) {

        var objectID = document.getElementById(obj.id);
        var isVisible = objectID.style.visibility;
        if (isVisible == "visible") alert("Image visible");
        else alert("Not visible");
        return false;
        }
</code></pre>

<p>I tried with</p>

<pre><code>var isVisible = $(obj.id).is(":visible");
if (isVisible == "visible") alert("Image visible");
else alert("Not visible");
</code></pre>

<p>But not working </p>

<p><strong>Edit:</strong></p>

<p>ItemDataBound event is as under</p>

<pre><code>protected void repTest_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            LinkButton lnkBtn = e.Item.FindControl("lnkProdName") as LinkButton;
            Image img = e.Item.FindControl("prodImg") as Image;
            img.Attributes.Add("style", "visibility:hidden");

            if (lnkBtn != null)
            {
                var tt = lbl.ClientID;
                lnkBtn.Attributes.Add("onClick", "return ChooseProd(" + img.ClientID + ");");
            }
        }
    }
</code></pre>

<p>And the Javascript is as under</p>

<pre><code>function ChooseProd(obj) 
{        

 var isVisible = $('#' + obj.id).is(":visible");
 if (isVisible) alert("Image visible"); 
 else alert("Not visible");            
 return false;           

}
</code></pre>

<p><strong>But irrespective of visibility:hidden or visible, the isVisible  is coming as true.</strong></p>

<p>Thanks</p>
