0

我正在为我的 TYPO3 网站使用 FlexSlider。我的网站Home页面使用 jQuery,我正在像这样链接

<head>
    <script type="text/javascript" src="fileadmin/templates/js/jquery-1.8.3.min.js"></script>
</head>

<body>
  <div id="slider">
     {slider}
  </div>
</body>

问题是,如果我jquery-1.8.3.min.js在头部给出链接,那么我的 Slider 将不起作用。但如果我删除它,它会起作用。由于其他动画原因,我无法删除它。

到目前为止,我在 flexslider/Configuration/TypoScript/constansts.txt 中做到了这一点

我变了settings.lib.jQuery to fileadmin/templates/js/jquery-1.8.3.min.js

它仍然行不通。

所以基本上我想要做的是将 jQuery 源路径更改为我的 fileadmin 中存在的 jQuery 文件

4

1 回答 1

1

I don't like to have every extension include their own external libs, so I can recommend to just define the version you want and remove the extension include setting.

page.includeJS {
    jquery = //ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
    jquery.external = 1
    jquery.forceOnTop = 1
}
plugin.tx_flexslider.settings.lib.jQuery >

All the code is in the setup part (not in constants) of my root page. This worked well on the sites we built recently.

Do you get an error on your site in the js console right now (then please post it) or does "It still won't work." just mean a blank page?

于 2013-08-02T12:00:10.617 回答