Reputation: 115
I am needing to use a jQuery plugin in a view. But even replacing the per JQuery and using JQuery.noConflits () the plugin does not work within the view and the firebug console shows the error:
ReferenceError: JQuery is not defined JQuery('.botao').click(function($) {
Estou carregando o JQuery antes do script que gera esse erro (acd.js):
<link href="${ctx}/view/common/resources/style/acd.css" type="text/css" rel="stylesheet" />
<script src="${ctx}/view/common/resources/scripts/jquery.js" type="text/javascript" />
<script type="text/javascript" >jQuery.noConflict()</script>
<script src="${ctx}/view/common/resources/scripts/acd.js" type="text/javascript" />
acd.js:
jQuery(document).ready(function($) {
JQuery('.botao').click(function($) {
[..]
Upvotes: 0
Views: 513
Reputation: 34426
Change the capitalization of your alias, you have set it to jQuery but try to call it with JQuery -
jQuery(document).ready(function($) {
jQuery('.botao').click(function($) { // make the change here
[..]
Upvotes: 2