php - Including jquery4php in yii -


how can include jquery4php(http://jquery4php.sourceforge.net/) in yii? have added following lines in layout/main.php

<?php yii::import('application.extensions.lib.*'); require_once('yepsua/labs/ria/jquery4php/ysjqueryautoloader.php'); ysjqueryautoloader::register(); ?> 

but when use

<?php echo  ysjquery::newinstance()   ->onclick()   ->in('#buttonid')   ->execute('alert("hello world")') ?> 

in other file yii shows

include(ysjquery.php): failed open stream: no such file or directory

error. how can include jquery4php in yii?

no need include jquery in yii done. have include lib is:

yii::app()->clientscript->registerpackage('jquery'); 

if use jquery4php loose ability place script want , create abstraction it's unneeded.

but if decide use it. put register script in index.php or in controller. layout/main last thing renderer in yii , there lib isn't loaded when call api

hope helps

claude


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -