public function __construct($intDelay = 0, $strCondition = null, $mixReturnParams = null) { parent::__construct($intDelay, $strCondition, 'th,td'); if (!$mixReturnParams) { $this->strReturnParam = '{"row": $j(this).parent()[0].rowIndex, "col": this.cellIndex}'; // default returns the row and colum indexes of the cell clicked } else { if (is_array($mixReturnParams)) { $combined = array_map(function ($key, $val) { return '"' . $key . '":' . $val; }, array_keys($mixReturnParams), array_values($mixReturnParams)); $this->strReturnParam = '{' . implode(',', $combined) . '}'; } elseif (is_string($mixReturnParams)) { $this->strReturnParam = $mixReturnParams; } } }
public function __construct($intDelay = 0, $strCondition = null) { parent::__construct($intDelay, $strCondition, 'input[type="checkbox"]'); }