First thing's first:
do not import an unofficial jQuery library forked by someone!
Now, when importing any script, you should always define the root of your site using JUri::root()
. You should also use Joomla's JHtml
method. So replace this:
$document->addStyleSheet('modules/mod_marquee/css/style.css');
$document->addScript('modules/mod_marquee/js/jquery-2.1.1.min.js');
$document->addScript('modules/mod_marquee/js/jquery.marquee.min.js');
$document->addScript('modules/mod_marquee/js/script.js');
with this:
JHtml::_('stylesheet', JUri::root() . 'modules/mod_marquee/css/style.css');
JHtml::_('script', 'http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js');
JHtml::_('script', JUri::root() . 'modules/mod_marquee/js/jquery.marquee.min.js');
JHtml::_('script', JUri::root() . 'modules/mod_marquee/js/script.js');
I'm not sure which version of Joomla you're using by take a look at my answer on another question to import jQuery properly
As for you script, try using this at the beginning instead:
jQuery(window).on('load', function($) {
else try using:
jQuery(document).ready(function($) {