40 lines
1.2 KiB
PHTML
40 lines
1.2 KiB
PHTML
<div class="alert alert-success" role="alert">Level: <strong>Beginner</strong></div>
|
|
|
|
<h3>Some Examples</h3>
|
|
<h4>jQuery Code (Javascript) - highlighted by EnlighterJS</h4>
|
|
<pre data-enlighter-language="jquery" data-enlighter-highlight="5">
|
|
$('#loading-example-btn').click(function () {
|
|
var btn = $(this)
|
|
btn.button('loading')
|
|
$.ajax(...).always(function () {
|
|
btn.button('reset')
|
|
});
|
|
});
|
|
</pre>
|
|
|
|
<h4>Code-Tabs</h4>
|
|
<pre data-enlighter-language="jquery" data-enlighter-highlight="5" data-enlighter-group="group1">
|
|
$('#loading-example-btn').click(function () {
|
|
var btn = $(this)
|
|
btn.button('loading')
|
|
$.ajax(...).always(function () {
|
|
btn.button('reset')
|
|
});
|
|
});
|
|
</pre>
|
|
<pre data-enlighter-language="mootools" data-enlighter-highlight="1" data-enlighter-group="group1">
|
|
// initialize enlighterjs for block elements
|
|
EnlighterJS.Util.Helper(document.getElements('pre'), {
|
|
// replace tabs with 2 spaces
|
|
indent: 2,
|
|
|
|
// special hover class
|
|
hover: 'myHoverClass',
|
|
|
|
// block element renderer
|
|
renderer: 'Block'
|
|
});
|
|
</pre>
|
|
|
|
<h4>Inline Code</h4>
|
|
<p>EnlighterJS also supports <code class="special" data-enlighter-language="js">alert('Inline Sourcecode highlighting');</code> (since version 2.0).</p>
|