codeigniter-simplicity icon indicating copy to clipboard operation
codeigniter-simplicity copied to clipboard

Recommended Change to css() amd js() fucntion

Open pyromanci opened this issue 8 years ago • 0 comments

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");

pyromanci avatar Mar 02 '17 13:03 pyromanci