Thanks to Jim Priest, I think I already have an answer. Looks like the code should be.
function checkReviewers(){ if (somecondition) { alert('reviewers off...do some stuff here'); $('.classname').hide(); } I would still welcome any comments if there is something that's missing here. But it looks good for now. ------------------------------------ Gerry Gurevich Application Development NIEHS ITSS Contractor Lockheed Martin Information Technology 919-361-5444 ext 311 ________________________________ From: Gurevich, Gerry (NIH/NIEHS) [C] Sent: Friday, October 19, 2007 11:24 AM To: jquery-en@googlegroups.com Subject: [jQuery] Calling hide/show methods from existing JavaScript function I have a javascript function that needs to do a variety of things and then it also needs to hide a section. Here is my function. It is called from a radio button on click event. Can anyone help me correct this syntax so I hide the code inside <div class="classname"> Hide me </div> function checkReviewers(){ if (somecondition) { alert('reviewers off...do some stuff here'); $(document).ready(function(){ $('.classname').hide(); }); } } ------------------------------------ Gerry Gurevich Application Development NIEHS ITSS Contractor Lockheed Martin Information Technology 919-361-5444 ext 311