[eluser]Phil Sturgeon[/eluser]
[quote author="NateL" date="1252986202"]When you write a view, you will write something similar to this code:
Code:
<link rel="stylesheet" href="<?php echo site_url(); ?>css/styles.css "type="text/css" media="screen" />
[/quote]
I don't mean to be picky but you have suggested a common mistake. This will break if you have index.php or any url_suffix. You should instead use base_url().
[quote author="obay" date="1253015565"]can you guys help me use Phil's library? it looks great but i can't get it to work.
1. i downloaded the library. copied the files into their respective folders inside the application folder: config, helpers, libraries.
2. i moved my "assets" folder inside application. the path to my jquery is now /system/application/assets/js/jquery.js
3. added asset library into autoload.php:
Code:
$autoload['config'] = array('asset');
$autoload['libraries'] = array('asset');
$autoload['config'] = array('asset');
4. my view:
Code:
<?= js('jquery/jquery.js'); ?>
< script >
$(document).ready(function() {
alert("hello");
});
< /script >
But it doesn't work. What am I doing wrong?
Any help appreciated

[/quote]
Have you configured the config file? You can put the assets anywhere you like if you configure it nicely. Did you have a look at the README on the GitHub page?