Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| slam4:php:codeigniter:jquery [2014/11/18 13:22] – jcheron | slam4:php:codeigniter:jquery [2019/08/31 14:21] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| * voir https:// | * voir https:// | ||
| - | * {{: | + | * A dézipper dans application/ |
| + | * Maj jsLibrary : {{:slam4:php: | ||
| + | |||
| + | ===== Configuration ===== | ||
| + | * Télécharger **JQuery**, et mettez le dans un dossier nommé **assets/ | ||
| + | * Ajouter la localisation de JQuery dans **config.php** | ||
| + | |||
| + | <sxh php; | ||
| + | $config[' | ||
| + | $config[' | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Exemple Ajax ===== | ||
| + | |||
| + | ==== Contrôleur ==== | ||
| + | <sxh php; | ||
| + | <?php | ||
| + | class Ctrl extends \CI_Controller { | ||
| + | function __construct() | ||
| + | { | ||
| + | parent:: | ||
| + | $this-> | ||
| + | } | ||
| + | |||
| + | function index(){ | ||
| + | $this-> | ||
| + | $this-> | ||
| + | $this-> | ||
| + | } | ||
| + | |||
| + | function ajaxGet(){ | ||
| + | echo " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Vue ==== | ||
| + | <sxh php; | ||
| + | <?php echo $library_src;?> | ||
| + | <?php echo $script_foot;?> | ||
| + | <div id=" | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | ==== Exécution dans un contrôleur ==== | ||
| + | |||
| + | <sxh php; | ||
| + | <?php | ||
| + | class CtrlAjax extends \CI_Controller { | ||
| + | function __construct() | ||
| + | { | ||
| + | parent:: | ||
| + | $this-> | ||
| + | } | ||
| + | |||
| + | function index(){ | ||
| + | $this-> | ||
| + | echo $this-> | ||
| + | } | ||
| + | |||
| + | function ajaxGet(){ | ||
| + | echo " | ||
| + | } | ||
| + | } | ||
| + | </ | ||