[jQuery] Re: Shorter method?

2007-05-31 Thread Richard D. Worth
On 5/31/07, SamCKayak [EMAIL PROTECTED] wrote: if($(obj).attr('checked')) { // Hide the correct answers? $('.quizsubheader').hide('slow'); } else { $('.quizsubheader').show('slow'); }; What's the best one-liner method to achieve the same

[jQuery] Re: Shorter method?

2007-05-31 Thread Richard D. Worth
On 5/31/07, Dan G. Switzer, II [EMAIL PROTECTED] wrote: Even shorter: $(.quizsubheader)[$(obj).attr('checked') ? 'hide' : 'show']('slow'); I saw that after I re-read mine, but wasn't certain on the syntax. Thanks Dan. - Richard