Jquery/Javascript
이 codeigniter에서 작동하지 않습니다. 무엇 내가 한 일은 내가 codeigniter에서 jquery를 사용하여 경고 할 때 아무런 변화가 없습니다
<?php $this->jquery->click('#username', $this->jquery->alert("hi")); ?>
을 포함하지만 아무 일도하지 내가
views/register.php
에서
public function __construct()
{
parent::__construct();
$this->load->library('javascript');
$this->load->library('javascript/jquery');
}
public function index()
{
$data['library_src'] = $this->jquery->script();
$data['script_head'] = $this->jquery->_compile();
$this->load->view('register', $data);
}
을 포함 config.php
에서
내가 controller/welcome.php
에서
$config['javascript_location'] = 'libraries/javascript/jquery.js';
$config['javascript_ajax_img'] = 'images/ajax-loader.gif';
을 포함한다. 오류가 표시되지 않습니다. 이벤트를 Codeigniter
에 만들려면 어떻게해야합니까? 이와 관련된 질문은 다른 사람들에게 물어 보지만 아직 해결책을 찾을 수 없습니다. 중복으로 표시하지 마십시오.
감사합니다.
편집
CI에 jQuery를 사용하기위한 어떤 다른 방법 (어떤 식 으로든). 간단히 CI에서 jquery를 만들 수 있습니다.
이 자산/JS 프로젝트의 루트에라는 당신이 할 수있는 이전 버전 있지만 새 폴더에 자바 스크립트 라이브러리를 수의 나 때문에 당신이 CodeIgniter를에 포함 된 버전이 아닌 자바 스크립트로 jQuery를 사용하는
js와 php를 결합한 이유는 무엇입니까? $ this-> load-> library ('javascript')는 무엇인가? $ this-> load-> library ('javascript/jquery'); –
@RakeshSharma, http://ellislab.com/codeigniter/user-guide/libraries/javascript.html에서 가져 왔습니다. 내가 $ this-> load-> library ('jquery')를 사용할 때; 이 오류가 요청 된 클래스 jquery로드 할 수 없습니다. – next2u
codeigniter에서 jquery 작업 할 수있는 어떤 방법이 있습니까? – next2u