我已經知道如何使用jQuery.noConflict()
方法使用jQuery的兩個版本。但是我真的想知道如果有可能build jQuery JavaScript源文件沒有使用jQuery
或者$
變量名。有可能使用兩個版本的jQuery而不使用jQuery.noConflict?
我想知道如果我可以這樣做:
<html>
<head>
<!-- This will set the variables: jQuery and $ -->
<script type="text/javascript" src="jquery-1.1.js"></script>
<!-- I would like to this next version do not use the variables: jquery and $ at all -->
<script type="text/javascript" src="jquery-1.5.js"></script>
</head>
</html>
,我現在面臨的問題是,我們是(我們的開發團隊)使用Liferay,它配備了一箇舊版本的jQuery ,並且我無法控制使用jQuery.conflict
,,所以我想知道是否可以使用與jQuery不同的名稱構建jQuery版本。
在此先感謝。
你是正確的...這將最終「後來咬我的後面」 ......在無論如何,我想聽聽你的意見,並知道是否有解決方案。但正如你所說,解決方案將是更進一步的問題。謝謝! – 2011-04-26 14:59:53