[eluser]ilSignorCarlo[/eluser]
Hi,
I often find myself writing functions inside controllers to load some jquery code just in certain pages.
For example:
Code:
function _load_create_post_js() {
return '
[removed]
$("#tags").autocomplete(\''.base_url().'admin/tag/search_autocomplete\', {
multiple: true,
autoFill: true,
multipleSeparator: " "
});
[removed]
';
}
I thought to put all the scripts in a certain directory and then load them in an array, but some of these scripts use base_url().
Is there a nice solution for this?