2013-08-26 39 views

回答

0

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

0

您可以使用模板中的addscript函數在頭部分中加載jquery。

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

但要注意,你必須使用noConflict功能,因爲的Joomla有時使用mootools的框架。

+0

我只需要在文章中包含jquery,因爲我不想在index.php上顯示它,我可以嗎? – bhavesh

+0

確定您只需要安裝[jumi](http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-content/1023)以允許php在文章中然後在我的答案中使用腳本 – JTC

相關問題