如何将下面的脚本放在liferay主题的portal_normal.vm中。
<script type="text/javascript">
var $old = $.noConflict();
</script>
我用与上面所示相同的方式编写了它。但它低于错误。我错过了什么吗?
09:03:38,440 ERROR [velocity:151] org.apache.velocity.exception.ParseErrorException: Encountered ")" at my-theme_SERVLET_CONTEXT_/templates/portal_normal.vm[line 24, column 33]
Was expecting one of:
<EOF>
"(" ...
<RPAREN> ...
<ESCAPE_DIRECTIVE> ...
<SET_DIRECTIVE> ...
"##" ...
"\\\\" ...
"\\" ...
<TEXT> ...
"*#" ...
"*#" ...
<STRING_LITERAL> ...
<IF_DIRECTIVE> ...
<STOP_DIRECTIVE> ...
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<WORD> ...
<BRACKETED_WORD> ...
<IDENTIFIER> ...
<DOT> ...
"{" ...
"}" ...
答案 0 :(得分:0)
您正在尝试避免Liferay主题中的jQuery Conflict。您可以使用
而不是使用$ .noConflict()<script type="text/javascript">
var old = jQuery.noConflict();
</script>