why i can not access with tables.column ?¿ says is not a function!!

why i can not access with tables.column ?¿ says is not a function!!

betita_elficabetita_elfica Posts: 4Questions: 1Answers: 0
edited May 2014 in General

I have this , it works but says this error: typeError: oTable.columns is not a function

<script type="text/javascript">
    var oTable;
    $(document).ready(function() {
         oTable = $('#materials').dataTable({
            "sDom": '<"add2">frtip',
            "bProcessing": false,
            "bServerSide": false,
            "sAjaxSource": "{{ URL::to('api/materials') }}"
        });
        $("div.add2").html("<a href= {{{ URL::to('materials/create') }}} class='iframe btn btn-default btn-sm'>{{ trans('forms.create') }}</a>");
    });

    $(document).on("change","#sel_tag",function(e){
        oTable.colum(3)
             .search( this.options[e.target.selectedIndex].text )
             .draw();
    });
</script>

Answers

This discussion has been closed.