Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
127
rated 0 times [  133] [ 6]  / answers: 1 / hits: 10893  / 10 Years ago, mon, september 1, 2014, 12:00:00

I have a problem with Yii grid view. for some reason it does not seem to load correctly, even though the script is included (i can see it in the source code).
This is the header part of the HTML:



<script src=fileadmin/static/js/jquery-1.8.3.min.js type=text/javascript></script>
<script src=/module/public/assets/80c0553/gridview/jquery.yiigridview.js type=text/javascript></script>
<script type=text/javascript>jQuery(function($) {
jQuery('#grid-downloads').yiiGridView({'ajaxUpdate':['grid-downloads'],'ajaxVar':'ajax','pagerClass':'pager','loadingClass':'grid-view-loading','filterClass':'filters','tableClass':'def-table','selectableRows':1,'enableHistory':false,'updateSelector':'{page}, {sort}','filterSelector':'{filter}','pageVar':'page'});
});
</script>


I get the Error: TypeError: jQuery(...).yiiGridView is not a function



Any ideas where the problem may lie?


More From » jquery

 Answers
12

I found the issue.



Actually the problem was, somehow i got jquery included 2 times in the page - the 2nd time in the footer, that is why I did't find our earlier.



Jquery needs to be only 1 time in the page, and it needs to be in the header.


[#42781] Saturday, August 30, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
denism

Total Points: 627
Total Questions: 96
Total Answers: 98

Location: Ivory Coast
Member since Sun, Mar 7, 2021
3 Years ago
;