Using jQuery within the KU Template
The KU Template utilizes the jQuery JavaScript Library by default. This allows you to easily make your site much more interactive with the user.
JQuery for KU is "contained", to avoid conflicts with other JavaScript you might use. As such, it must be referenced with: $kuj.
Here is an example as to how this is different from the default jQuery.
Original jQuery code:
<script type="text/javascript">
$(document).ready(function(){
$("#leftnav").accordion();
});
</script>
$(document).ready(function(){
$("#leftnav").accordion();
});
</script>
Same code using the KU jQuery library:
<script type="text/javascript">
$kuj(document).ready(function(){
$kuj("#leftnav").accordion();
});
</script>
$kuj(document).ready(function(){
$kuj("#leftnav").accordion();
});
</script>
As you can see from the above, just replace the plain "$" with "$kuj".
Extending jQuery and using Add-ons
By default, the KU template only loads the base jQuery library. Consequently, you may need to add in other libraries to achieve your desired functionality. This is easily done by using the "myjs" SSI settings. KU has many of these libraries already availabe for your use at webmedia.ku.edu.




top