call function with jQuery to prevent $ namespace conflicts

This commit is contained in:
Sanjay B 2009-11-24 14:23:03 +05:30
parent c0fce19bab
commit 522bb7632e

View File

@ -16,12 +16,13 @@
js: js:
$(document).ready(function() { $('.srt').srt(); }); $(document).ready(function() { $('.srt').srt(); });
in the above example, jquery.srt.js will try to load subtitles in all elements with 'srt' class. in the above example, jquery.srt.js will try to load subtitles in all elements with 'srt' class.
'data-video' atribute is used to link to the related video, 'data-video' atribute is used to link to the related video,
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.
*/ */
(function() { (function($) {
function toSeconds(t) { function toSeconds(t) {
var s = 0.0 var s = 0.0
if(t) { if(t) {
@ -106,5 +107,5 @@
} }
}); });
}; };
})(); })(jQuery);