Well, it actually gets even shorter... you can combine the two selectors into one....
jQuery("#TreeviewTd, #MenuBarTd").toggle(); I have no experience with the UpdatePanel, but I encourage you to get rid of all other AJAX libraries and stick to jQuery... Can you tell me why jQuery(document).ready(function(){...}); doesn't work when UpdatePanel is present?