Skip to content

Recommended Change to css() amd js() fucntion #12

@pyromanci

Description

@pyromanci

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions