/** * utilities easyselector Multiple function * * @param array $array * @return string */ public static function easyMultConstruct($array) { return magixcjquery_jquery_magixcjQuery::getjQueryHandling() . '.easySelector({' . magixcjquery_jquery_params::forSpecialOptions($array) . '});'; }
/** * function getJson ajax * * @param string $url * @param string $data * @return string */ public static function getJson($url, $data = false, $callback = false, $param = false, $encode = 'noencode') { $ajax = magixcjquery_jquery_magixcjQuery::getjQueryHandling() . '.getJSON('; $ajax .= $url ? '"' . $url . '"' : ''; switch ($encode) { case 'noencode': $ajax .= $data ? ',{' . parent::forSpecialOptions($data) . '}' : ''; break; case 'encode': $ajax .= $data ? ',' . json_encode($data) : ''; break; } $ajax .= $callback ? ',function(' . $param . '){ ' . $callback . '}' : ''; $ajax .= ');'; return $ajax; }