Welcome Guest, Not a member yet? Register   Sign In
Javascript and jquery
#2

[eluser]eokorie[/eluser]
Hi Pedro,

You aren't the only one who found it confusing as well.. I suppose they might still be working on that aspect of the library. I did however figure a few things out.

$library_src will output the location to you javascript files if you have defined them in your controller, where as $script_head, the way I understand it, should output any javascript codde defined in your controller.

"http://localhost/codeigniter/themes/js/jquery/" is still a bit dubious to me so hopefully someone can explain the issue here.

If you are using a template and want to use the javascript library, you may want to add
Code:
<?php echo $library_src;?>
<?php echo $script_head;?>
to the head of your html file and
Code:
<?php echo $script_foot; ?>
to your html footer, ideally before the closing </body> tag.

Any scripts, you enter in the controller will be displayed in $script_foot by default. If you wish to see an example of the Javascript library in use, let me know. Have been working on this for the past 2 days.


Messages In This Thread
Javascript and jquery - by El Forum - 01-30-2011, 10:31 AM
Javascript and jquery - by El Forum - 01-30-2011, 02:32 PM
Javascript and jquery - by El Forum - 01-30-2011, 05:15 PM
Javascript and jquery - by El Forum - 01-30-2011, 05:46 PM
Javascript and jquery - by El Forum - 01-30-2011, 05:48 PM
Javascript and jquery - by El Forum - 01-31-2011, 12:17 AM
Javascript and jquery - by El Forum - 01-31-2011, 09:46 PM
Javascript and jquery - by El Forum - 02-01-2011, 03:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB