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/20 01:33] – jcheron | slam4:php:codeigniter:jquery [2019/08/31 14:21] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 3: | Ligne 3: | ||
| * voir https:// | * voir https:// | ||
| * A dézipper dans application/ | * A dézipper dans application/ | ||
| + | * Maj jsLibrary : {{: | ||
| ===== Configuration ===== | ===== Configuration ===== | ||
| + | * Télécharger **JQuery**, et mettez le dans un dossier nommé **assets/ | ||
| + | * Ajouter la localisation de JQuery dans **config.php** | ||
| - | Ajouter la localisation de JQuery dans config.php | + | <sxh php;title:config.php> |
| + | $config[' | ||
| + | $config[' | ||
| + | </ | ||
| - | <sxh php;config.php> | + | |
| - | $config['javascript_location'] = 'http://127.0.0.1/dokuwiki/js/jquery-2.0.3.js'; | + | ===== Exemple Ajax ===== |
| - | $config['javascript_ajax_img'] = ' | + | |
| + | ==== Contrôleur ==== | ||
| + | <sxh php;title:Ctrl.php> | ||
| + | <?php | ||
| + | class Ctrl extends \CI_Controller { | ||
| + | function __construct() | ||
| + | { | ||
| + | parent:: | ||
| + | | ||
| + | } | ||
| + | |||
| + | function index(){ | ||
| + | $this-> | ||
| + | $this-> | ||
| + | $this-> | ||
| + | } | ||
| + | |||
| + | function ajaxGet(){ | ||
| + | echo " | ||
| + | } | ||
| + | } | ||
| + | </sxh> | ||
| + | |||
| + | ==== 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 " | ||
| + | } | ||
| + | } | ||
| </ | </ | ||