From 522bb7632e6198cfa4f25e8d49f2fbeadc48f182 Mon Sep 17 00:00:00 2001 From: Sanjay B Date: Tue, 24 Nov 2009 14:23:03 +0530 Subject: [PATCH] call function with jQuery to prevent $ namespace conflicts --- jquery.srt.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jquery.srt.js b/jquery.srt.js index 9011ed1..a1cb55b 100644 --- a/jquery.srt.js +++ b/jquery.srt.js @@ -16,12 +16,13 @@ js: $(document).ready(function() { $('.srt').srt(); }); + 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, if no data-srt is provided, the contents of the div is parsed as srt. */ -(function() { +(function($) { function toSeconds(t) { var s = 0.0 if(t) { @@ -106,5 +107,5 @@ } }); }; -})(); +})(jQuery);