In my page I'm trying to create a jsgrid table I think nothings wrong because I imported things right way but it gives me this;
Uncaught TypeError: $(...).jsGrid is not a function error
Is there something wrong because I didn't see any mistake about initializing the table?
And heres my code:
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.js"></script>
<script src="assets/vendors/js/vendor.bundle.base.js"></script>
<script src="assets/vendors/js/vendor.bundle.addons.js"></script>
<script>
$("#brands_table").html("asd");
$("#brands_table").jsGrid({
width: "100%",
height: "400px",
filtering: true,
inserting:true,
editing:true,
sorting:true,
paging:true,
autoload:true,
pageSize:10,
pageButtonCount:5,
deleteConfirm:"Silmek istediğinize emin misiniz?",
controller:{
loadData: function (filter) {
return $.ajax({
type:"GET",
url:"assets/php/getbrands.php",
data:filter
});
},
},
fields:[
{
name:"id",
type:"hidden",
css:'hide'
},
{
name:"name",
type:"text",
width:150,
validate:"required"
},
{
type: "control"
}
]
});
</script>
Problem was
<script src="assets/vendors/js/vendor.bundle.base.js"></script>
These scripts' function names were overlapping with jsGrid function names so that was blocking browser/javascript to read functions properly i moved those script to where they were required so theres no problem for now thank you for all your help and effort..