Bootstrap formatting code
by serra
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.0/bootstrap.min.js"></script>
<script src="http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.js"></script>
<div class="container"> <pre class="prettyprint linenums">
function(){
echo "test";
}
</pre>
<div class="well muted">jQuery 1.9.1, bootstrap.min.js 2.3.0, bootstrap css http://twitter.github.com/bootstrap/assets/css/bootstrap*css</div>
</div>
CSS
@import url('http://twitter.github.com/bootstrap/assets/css/bootstrap.css');
@import url('http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css');
@import url('http://twitter.github.com/bootstrap/assets/css/docs.css');
@import url('http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.css');
.container {
margin-top: 10px;
}
JavaScript
! function ($) {
$(function () {
window.prettyPrint && prettyPrint()
})
}(window.jQuery)