codeigniter-simplicity
codeigniter-simplicity copied to clipboard
Recommended Change to css() amd js() fucntion
The lines checking for if the script or css file is extrenal or not should be alter to be more like:
$is_external = (preg_match("/^https?:\/\//", trim($script_file)) > 0) ? true : ((substr($script_file,0,2) == '//') ? true :false );
This would allow for calls like:
$this->load->js("//code.jquery.com/jquery-1.12.4.js");
$this->load->js("//code.jquery.com/ui/1.12.1/jquery-ui.js");
$this->load->css("//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css");