Welcome Guest, Not a member yet? Register   Sign In
Using CI 2's javascript/jquery lib
#1

[eluser]Roobiz[/eluser]
Does anyone try to use the jquery lib in CI 2?


I follow the corresponding doc's in user guide but it's not seems to work.

User guide:
<code>
$this->load->library('jquery');
</code>

doesn't work but
<code>
$this->load->library('javascript', array('js_library_driver' => 'jquery', 'autoload' => TRUE));
</code>
yes.

After that
<code>
&lt;?php echo $jquery_script;?&gt;
&lt;?php echo $script_head;?&gt;
</code>

Like in guide doesn't work, var aren't init. I have tried to find a way to initilize it but don't find anything.


The jquery constructor doesn't have the same name as the class so it never be call. I replace it, and it's now call;

But... many errors remains...



Since 1 year, no major release for CI and the best thing (for me, js / jquery lib) is not ready to use Sad ... What Ellislab do ? CI is going dead or what ?
#2

[eluser]Narkboy[/eluser]
1) 2.0 is in development.
2) Feel free to pitch in with bug reports and constructive support.
3) Use 1.7.2 if you're not comfortable with pre-release versions.

/B
#3

[eluser]Roobiz[/eluser]
1) I know, since 1 year :/
2) I think it's not a but report, it's just not "already" finish.
3) Yes I already use 1.7.2, but it seems that 2.0 is stable so...
#4

[eluser]ELRafael[/eluser]
It's a little stranger this kind of reply.

http://philsturgeon.co.uk/news/2010/10/c...-is-stable

Quote:The truth is CodeIgniter 2.0 has been stable for months.

Quote:At the time of writing there are 93 issues in the Issue Tracker on BitBucket. The vast majority of those are invalid, irrelivant, ridiculous or badly described and non-repeatable. Another thing to remember is that most of these issues (and more) exist in CodeIgniter 1.7.x. I have found several bugs in 1.7.2 that I have fixed and pushed in 2.0. Now that CodeIgniter 1.7.x is frozen, all fixes for any bugs discovered are going into 2.0. That means CodeIgniter 2.0 is actually more stable than 1.7.2.

So, can we say it's better to use 2.0 version instead 1.7.2?

What I noticed that somethings inside user_guide aren't documented. You can put a issue telling this.
Can you try other ways to make Javascript library work correctly? If you can, put the changes in Bitbucket. ;-)

Regards
#5

[eluser]pickupman[/eluser]
There are somethings that are easy to do using CI, however, jquery is not one of them. It not that difficult to drop in the link from the google cache to jquery. I would also guess a little lighter weight as well. One the powerful features of jQuery is method chaining which seems to be missed with using CI's. The markup seems more verbose as well.




Theme © iAndrew 2016 - Forum software by © MyBB