editted example in index.html to reflect changes
This commit is contained in:
parent
c5b3560fca
commit
05bcf8ef12
|
@ -63,14 +63,17 @@ code {
|
||||||
<pre><code>
|
<pre><code>
|
||||||
<script type="text/javascript" src="jquery.js"></script>
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
<script type="text/javascript" src="jquery.srt.js"></script>
|
<script type="text/javascript" src="jquery.srt.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('.srt').srt();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<video src="http://example.com/video.ogv" id="video" controls>
|
<video src="http://example.com/video.ogv" id="video" controls>
|
||||||
</video>
|
</video>
|
||||||
<div class="srt"
|
<div class="srt"
|
||||||
data-video="video"
|
data-video="video"
|
||||||
data-srt="http://example.com/video.srt" />
|
data-srt="http://example.com/video.srt" />
|
||||||
</code></pre>
|
</code></pre>
|
||||||
jquery.srt.js will try to load subtitles in all elements with 'srt' class.<br>
|
|
||||||
'data-video' atribute is used to link to the related video,<br>
|
'data-video' atribute is used to link to the related video,<br>
|
||||||
if no data-srt is provided, the contents of the div is parsed as srt.
|
if no data-srt is provided, the contents of the div is parsed as srt.
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user