public function create()
    {
        $script = "<script>\n\t$(function(){ \n\t\t";

        if ($this->click) {
            $script .= "\t$('".$this->click[0]."').on('".$this->click[1]."',function(){ \n\t\t\t\t $.amaran(". json_encode($this->amaran).") \n\t\t\t}); \n\t\t});\n\t</script>\n";
        } else {
            $script .= "$.amaran(".json_encode($this->amaran)."); \n\t });\n</script>\n";
        }


        if ($this->flash) {
            $this->session->flash('amaranjs.content', $script);
        } else {
            $this->viewBinder->bind($script);
        }
    }
public function create()
    {
        $script = "<script>\n\t$(function(){ \n\t\t";

        if ($this->click) {
            $script .= "\t$('".$this->click[0]."').on('".$this->click[1]."',function(){ \n\t\t\t\t $.amaran(". json_encode($this->amaran).") \n\t\t\t}); \n\t\t});\n\t</script>\n";
        } else {
            $script .= "$.amaran(".json_encode($this->amaran)."); \n\t });\n</script>\n";
        }


        if ($this->flash) {
            $this->session->flash('amaranjs.content', $script);
        } else {
            $this->viewBinder->bind($script);
        }
    }
public function create ( ) { $ script = "<script>\n\t$(function(){ \n\t\t" ; if ( $ this -> click ) { $ script .= "\t$('" . $ this -> click [ 0 ] . "').on('" . $ this -> click [ 1 ] . "',function(){ \n\t\t\t\t $.amaran(" . json_encode ( $ this -> amaran ) . ") \n\t\t\t}); \n\t\t});\n\t</script>\n" ; } else { $ script .= "$.amaran(" . json_encode ( $ this -> amaran ) . "); \n\t });\n</script>\n" ; } if ( $ this -> flash ) { $ this -> session -> flash ( 'amaranjs.content' , $ script ) ; } else { $ this -> viewBinder -> bind ( $ script ) ; } }
Bind AmaranJS to view.
Bind AmaranJS to view .