Hi,
I'm trying to hide an asp:CheckBox control depending on whether or not a certain link is visible on the screen. The checkbox has a text attribute = "hello". I'm trying to do this in JQuery.
I currently have the following:
$(document).ready(function(){
hideCheckboxButtonIfLinkExists();
} );
function hideCheckboxButtonIfLinkExists() {
var $myCheckBox = $('#<%= ckMyCheckBox.ClientID %>');
var $myLink = $('#<%= lkMyLink.ClientID %>');
if($myLink .is(':visible'))
{
$myCheckBox .show();
}
else
{
$myCheckBox .hide();
}
}
When I open the page if the link is not visible then the checkbox is not visible, however the checkbox text attribute "hello" is visible.
How can I hide this also?
Thanks in advance for your help.