Question

I have searched all over. They are saying the correct syntax to load jquery in normal mode is JHtml::_('jquery.framework', false);

I have tried and failed. I need to load jQuery so it works on all pages, so where should i put this inside the template index.php file? in head? above the head? does it need to be wrapped inside or not? I just need this to be spoon-fed to me because most forums assume people would already know where to put it...thanks.

Was it helpful?

Solution

You have 2 options. You can either call it normally which is exactly the same as the code you provided above, or you can all it in noConflict mode which is simply like this:

JHtml::_('jquery.framework');

This code should be place in the template's index.php file and can be placed anywhere as it will automatically be appended to the <head> tags of your template. As this is PHP code, it of course needs to go inside <?php ?> tags.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top