Open abritinthebay opened 11 years ago
This is a problem if you're building a library which may or may not have video on page load. For example in any modern javascript application.
Simple fix - in videosub_main add this as the second line:
if(!myVideo) { return; }
and then add below the domReady call:
$VIDEOSUB.fn.videosub = videosub_main;
So the code is callable when needed. In fact I'd suggest removing the dom call entirely.
This is a problem if you're building a library which may or may not have video on page load. For example in any modern javascript application.
Simple fix - in videosub_main add this as the second line:
if(!myVideo) { return; }
and then add below the domReady call:
$VIDEOSUB.fn.videosub = videosub_main;
So the code is callable when needed. In fact I'd suggest removing the dom call entirely.