I've got this HTML:

 

<tr id="propertyID-#propertyID#">

 

   <td style="width:20px; padding:10px 6px 0 0;">

 

      <cfif qCheckFeatured.recordCount eq 0>

         <img src="../../site_images/icon_accept.gif"
style="visibility:hidden;">

      <cfelse>

         <img src="../../site_images/icon_accept.gif"
style="visibility:visible;">

      </cfif>

 

   </td>

 

   <td style="width:480px; padding:10px 0 0 0;">

 

      <a href="" onClick="return false;" class="featured">#streetNumber#
#streetName#, #city#, #state#</a>

 

   </td>

 

</tr>

 

The "icon_accept.gif" at the beginning of each row in the table is either
hidden or visible.

 

I want to be able toggle the visibility by clicking on the address, which
has the class of "featured".

 

I've tried this jQuery (and many other variations).

 

function selectFeaturedProperties() {

              

   $('.featured').live('click', function() {

                     

      var   img = $(this).parent().previous().find('img');

                     

      if    (   img.css('visiblity', 'visible')   )

            {   img.fadeOut(250);                 }

                           

      else  {   img.fadeIn(250);                  }

                           

   });

}

 

Something's obviously wrong, but I don't know which part.

 

Ideas?  (Seems like this should be simple, but I'm just not getting it.)

 

Thanks,

 

Rick

----------------------------------------------------------------------------
---------------------------------------

"Those who hammer their guns into plows will plow for those who do not."  -
Thomas Jefferson

 

Reply via email to