How to load jscript-file before bootstrap.js load

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
cadko
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Thu Jul 26, 2012 12:36 pm
Location: Russia
Contact:

How to load jscript-file before bootstrap.js load

Postby cadko » Tue Nov 14, 2017 10:39 am

I use Bootstrap 3 for my Joomla template. It was okay, when I copy bootstrap.min.js to <my_template>/js/jui/ folder. Joomla first loads JQuery, then loads Bootstrap.

And now in Bootstrap 4 there is one more file - popper.js. And in joomla I need first load JQuery, then popper.js, then Bootstrap.

What is proper way to load popper.js BETWEEN jquery.js and bootstarp.js.

I ask, cause

Code: Select all

JHtml::_("jquery.framework");
JHTML::script('popper.js');
JHtml::_("bootstrap.framework");

in my template doesn't work. Joomla first load jquery, then bootstrap, then popper.

It seems, that Joomla loads jquery and bootstrap early (not in my template, maybe in some plugin, or in core), than popper.js and

Code: Select all

JHtml::_("jquery.framework");
JHtml::_("bootstrap.framework");
in my template seems ignoring.

Maybe I can override JHtml::_("jquery.framework") or JHtml::_("bootstrap.framework")?
Me and my pet projects on http://mokhin-tech.ru/en

User avatar
effrit
Joomla! Intern
Joomla! Intern
Posts: 87
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: How to load jscript-file before bootstrap.js load

Postby effrit » Tue Nov 14, 2017 12:04 pm


cadko
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Thu Jul 26, 2012 12:36 pm
Location: Russia
Contact:

Re: How to load jscript-file before bootstrap.js load

Postby cadko » Wed Nov 15, 2017 5:35 am

Thank you! It solved my issue!
Me and my pet projects on http://mokhin-tech.ru/en


Return to “Extensions for Joomla! 3.x”

Who is online

Users browsing this forum: No registered users and 9 guests