jQuery plugins appear before jQuery in document head

Did you find a bug in Joomla! 3.x but aren't sure? This forum is the place to help figure out if the problem is a bug and how to report it. If you are an experienced Joomla! user and are certain that you have found a bug please use the Bug Tracker to submit your issue.
This forum is for discussion about bugs and to get help with reporting them to the Bug Tracker: https://issues.joomla.org

Moderator: ooffick

Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
Locked
oslicku
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Jun 17, 2010 9:28 pm
Location: UK

jQuery plugins appear before jQuery in document head

Post by oslicku » Mon Oct 15, 2012 10:27 am

When I add jQuery plugins to my component they appear before jQuery in the <head> of the document.

This means that the plugin doesn't work. Surely and scripts added via $document->addScript() as happens for MooTools.

I think this is a bug (fairly urgent) as it means no jQuery plugins can be used as it stands...

oslicku
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Jun 17, 2010 9:28 pm
Location: UK

Re: jQuery plugins appear before jQuery in document head

Post by oslicku » Tue Oct 16, 2012 8:30 am

No one else seen this?

awc737
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Oct 29, 2012 3:47 pm

Re: jQuery plugins appear before jQuery in document head

Post by awc737 » Thu Nov 08, 2012 4:32 am

Yeah... this is no bueno... giving me trouble right now I need a fix. I'm trying to add a script into a custom component's view.html.php with:
$this->document->addScript('/templates/protostar/js/custom.js'');

Frustrating...

awc737
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Oct 29, 2012 3:47 pm

Re: jQuery plugins appear before jQuery in document head

Post by awc737 » Thu Nov 08, 2012 4:48 am

Update, adding this first line fixed it:
JHtml::_('bootstrap.framework');
$this->document->addScript('/templates/jw_protostar/js/orders.js');
parent::display($tpl);

This may help: http://stackoverflow.com/questions/1307 ... n-joomla-3


Locked

Return to “Joomla! 3.x Bug Reporting”