0

我正在使用 joomla2.5,我需要在我的一个页面(不是主页)上具有 jquery 效果,所以我想知道如果没有,我可以将 jquery 包含到 joomla 文章中,那么我该怎么办?

4

2 回答 2

0

<head>您可以在该部分的 index.php 中包含 jquery 。

于 2013-08-26T09:54:36.490 回答
0

您可以在模板中使用 addscript 函数在 head 部分加载 jquery。

<?php
$document = JFactory::getDocument();
$document->addScript('/media/system/js/sample.js');
?>

但请注意,您必须使用noConflict功能,因为 joomla 有时会使用 mootools 框架。

于 2013-08-26T10:00:51.533 回答