/** * jQuery toggle() function * Toggle displaying each of the set of matched elements. * * @param string $nid * @param string $speed * @param string $callback True if callback * @return string */ public static function jToggle($nid = false, $speed = 600, $callback = false, $end = true) { $fx = $nid ? magixcjquery_jquery_magixcjQuery::getjQueryHandling() . '(' . $nid . ')' : ''; $fx .= '.toggle('; $fx .= $speed ? parent::speed($speed) . ',' : ''; //$fx .= $switch ? ','.$switch : ''; $fx .= $callback ? '' . parent::callback($callback) : ''; $fx .= ')'; $fx .= $end ? ';' : ''; return $fx; }