Today I downloads prettify-4-Mar-2013.tar.bz2.And I use the "prettify.css" and "prettify.js" in it. I know I can use it in an easy way just use the "run_prettify.js", but I want to serve my own JS & CSS. Here's my html.
<html>
<head>
<link rel="stylesheet" type="text/css" href="prettify.css">
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src='prettify.js'></script>
<script type="text/javascript">
$(document).ready(function() {
prettyPrint();
});
</script>
</head>
<body>
<pre class="prettyprint">
class Voila {
public:
// Voila
static const string VOILA = "Voila";
// will not interfere with embedded
}
</pre>
</body>
Here's my javascript. (I have imported jQuery.js,prettify.css,prettify.js.) All of the javascripts following do not work.
$(function() {
prettyPrint();
});
Or
$(document).ready(function() {
prettyPrint();
});
The error message is "Uncaught TypeError: Property 'prettyPrint' of object [object Object] is not a function "
Or
<body onload="prettyPrint()">
still do not work.