Quick way to use checkbox to show/hide a div
The following code illustrates a simple show/hide feature, based on status of a checkbox. The checkbox calls it onClick.
myShowHideFunc = function(obj){ var displayMode = (obj.checked)?"none":"inline"; var focusobj = $("#DivToToggle"); $(focusobj).css({'display':displayMode}); }
I draw your attention to the displayMode variable which is set by the if-then switch to a language that the jQuery css command can understand.