Skip to main content
Commonmark migration
Source Link

First thing's first:

##do not import an unofficial jQuery library forked by someone!

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($) {

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($) {

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($) {
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

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 properlyanswer 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($) {

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($) {

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($) {
added 4 characters in body
Source Link
Lodder
  • 26.9k
  • 3
  • 48
  • 94

First thing's first:

##do nonot 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($) {

First thing's first:

##do no import 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($) {

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($) {
Source Link
Lodder
  • 26.9k
  • 3
  • 48
  • 94
Loading