Skip to content

Commit

Permalink
Add note about using with add_group() in 'Extra Attributes'
Browse files Browse the repository at this point in the history
  • Loading branch information
canton7 committed Jan 4, 2012
1 parent cbcb794 commit 2a1f92f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions readme.md
Expand Up @@ -461,6 +461,21 @@ echo Casset::render_css();
// <link rel="stylesheet" type="text/css" href="http://...somefile.css" media="print" />
```

You can also pass them in the `$options` argument to `Casset::add_group()`, for example:

```php
Casset::add_group('js', 'my_deferred_js', array(
'file.js',
), array(
'attr' => array(
'defer' => 'defer',
),
);

echo Casset::render_js();
// <script type="text/javascript" src="http://...somefile.js" defer="defer"></script>
```

NOTE: You used to be able to pass an `$attr` argument to `Casset::render()`.
This behaviour has been deprecated, although it still works.
Please move to the new system.
Expand Down

0 comments on commit 2a1f92f

Please sign in to comment.