Flexible JavaScript & CSS Inclusion in EE

language: jQuery (JavaScript)
license: Other

Code for Snippet:

                
<script src="/mint/?js" type="text/javascript"></script>
<script type="text/javascript" src="{site_url}js/jquery-1.2.6.min.js"></script>
 
{if "{embed:add}" != ""}
<?php $splitcontents = explode('|', '{embed:add}');
foreach($splitcontents as $file) {
 echo '<script type="text/javascript" src="{site_url}js/'.$file.'.js"></script>'."\n";
} ?>
{/if}  
 
 
{embed="common/_styles"}
{embed="common/_scripts"}
</head>  
 
{embed="common/_styles"}
{embed="common/_scripts" add="syntax"}  
 
----------
 
<link rel="stylesheet" href="http://devot-ee.com/css/default.css" type="text/css" />
 
<script src="/mint/?js" type="text/javascript"></script>
<script type="text/javascript" src="http://devot-ee.com/js/jquery-1.2.6.min.js"></script>
 
<script type="text/javascript" src="http://devot-ee.com/js/syntax.js"></script>  
 
----------
 
{embed="common/_styles" add="validation|contact-form"}
{embed="common/_scripts" add="syntax|jquery.validate.min|jquery.numeric|misc-functions"}  
 
----------
 
<link rel="stylesheet" href="http://devot-ee.com/css/default.css" type="text/css" />
 
<link rel="stylesheet" href="http://devot-ee.com/css/validation.css" type="text/css" />
<link rel="stylesheet" href="http://devot-ee.com/css/contact-form.css" type="text/css" />
 
<script src="/mint/?js" type="text/javascript"></script>
<script type="text/javascript" src="http://devot-ee.com/js/jquery-1.2.6.min.js"></script>
 
<script type="text/javascript" src="http://devot-ee.com/js/syntax.js"></script>
<script type="text/javascript" src="http://devot-ee.com/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="http://devot-ee.com/js/jquery.numeric.js"></script>
<script type="text/javascript" src="http://devot-ee.com/js/misc-functions.js"></script>  
comments powered by Disqus

Info

Tags: Expression Engine EE

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 362
Date Added: 2009-08-15 11:44:28
Last Modified: 0000-00-00 00:00:00

Web Analytics