Is there way to make two HTML ID's link to one javascript function?

后端 未结 3 1743
情书的邮戳
情书的邮戳 2021-01-27 06:49

I have two tables that need to have different IDs or they will not work. I\'m using 3rd party data table code that uses the ID to differentiate between the different tables in t

3条回答
  •  情歌与酒
    2021-01-27 07:28

    Alternatively:

    var $DTs = $(".someSemanticClassForAllIntendedTables"); //for easy reference elsewhere
    $DTs.DataTable({ //options });
    

提交回复
热议问题