Dynamics load content using jQuery plugin - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Dynamics load content using jQuery plugin (/showthread.php?tid=22819) |
Dynamics load content using jQuery plugin - El Forum - 09-21-2009 [eluser]Unknown[/eluser] Hi, I have an idea for dynamic loading content using jQuery plugin, because I have many clients and websites where I'm using loading content to page elements using Ajax (jQuery). I can write jQuery plugin for loading pages in CodeIgniter, but I can't write any class (plugin) to the CodeIgniter. My idea: 1) First step will be an uploading jQuery plugin to js folder (or any other folder name) placed in root. 2) Loading plugin in controller class using code like: Code: $this->jquery->load('js/jQuery.load.js'); Code: onclick="<? $this->jquery->load('<? echo base_url(); ?>index.php/some_controller','#pageContent'); ?>" Code: rel="jQuery.load,<? echo base_url(); ?>index.php/some_controller,#pageContent" My question is a how can I write any CodeIgniter class for using this plugin? Thanks a lot for answers... ... sorry for my english ;-) ... Dynamics load content using jQuery plugin - El Forum - 09-22-2009 [eluser]Damien K.[/eluser] Your problem is fuzzy, maybe due to your English skills. I think your problem is with trying to load a JavaScript file from within your controller. JavaScript is a view component so usually you would handle the loading of the js file in your view and not in your controller. |