/** * Constructor IOSNotifications * @param mixed $title * @param mixed $message * @param double $delay [default value: 3000] */ function __construct($title, $message, $delay = 3000) { $this->title = $title; $this->message = $message; $this->delay = $delay; $js = ""; $js .= "ios.notify({\n title: '" . addslashes($this->title) . "',\n message: '" . addslashes($this->message) . "',\n delay: '" . addslashes($this->delay) . "'\n});"; parent::__construct($js); $this->addJavaScript(BASE_URL . "wsp/js/ios.notify.js", "", true); $this->addCss(BASE_URL . "wsp/css/ios-notify/ios.notify.css", "", true); $this->addCss(BASE_URL . "wsp/css/ios-notify/ios.notify.webkit.css"); }
/** * Constructor * * <code> * $js = new JQuery('#id'); * echo $js->attr('value', 'Hello world')->css('color', '#ff0000')->focus()->select(); * </code> * * @param string $selector JQuery selector. For example: '#id', 'input'... * */ function __construct($selector) { parent::__construct(); $this->selector = $selector; }