Ejemplo n.º 1
0
 /**
  * jQuery removeClass() function 
  * Overview
  * removeClass( [class], [duration] )
  * Removes all or specified class from each of the set of matched elements with an optional transition between the states.
  *
  * @param string $nid
  * @param string $class
  * @param string $duration
  * @param string $callback True if callback
  * @return string
  */
 public static function removeClass($nid = false, $class, $duration = false, $callback = false, $end = true)
 {
     $uifx = $nid ? magixcjquery_jquery_magixcjQuery::getjQueryHandling() . '(' . $nid . ')' : '';
     $uifx .= '.removeClass("';
     $uifx .= $class . '"';
     $uifx .= $duration ? ',' . $duration : '';
     $uifx .= $callback ? ',' . parent::callback($callback) : '';
     $uifx .= ')';
     $uifx .= $end ? ';' : '';
     return $uifx;
 }
Ejemplo n.º 2
0
 /**
  * jQuery animate() function
  *
  * @param string $nid
  * @param array $params array(Constante=>'val')
  * @param string $duration
  * @param string $easing
  * @param string $callback True if callback
  * @return string
  */
 public static function jAnimate($nid = false, $params, $duration = false, $easing = false, $callback = false, $end = true)
 {
     $fx = $nid ? magixcjquery_jquery_magixcjQuery::getjQueryHandling() . '(' . $nid . ')' : '';
     $fx .= '.animate({';
     $fx .= $params ? parent::forOptions($params) . '}' : '';
     $fx .= $duration ? ',{duration:' . $duration : '';
     $fx .= $easing ? ',' . $easing : '';
     $fx .= '}';
     $fx .= $callback ? ',' . parent::callback($callback) . '}' : '';
     $fx .= ')';
     $fx .= $end ? ';' : '';
     return $fx;
 }