is a good practice , include datatables in functions javascript ?

is a good practice , include datatables in functions javascript ?

adrianesoadrianeso Posts: 1Questions: 1Answers: 0

Hello, it is not a problem but i want to know it.
is good practice include datatables in js functions ?

function myfun1(){
    datatable.datatable({    });
}

function myfun2(){
    datatable2.datatable({    });
}

...etc

or is better draw one table for each file js into initiallitation jquery ?

Thanks

Answers

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765

    You can use functions if you like. When and where you initialize Datatables is up to the specific requirements of the web page you are building.

    Kevin

This discussion has been closed.