特定のテーブルの各 th 要素に関数を追加します。
$(document).ready(function()
{
$('#table_id thead th').each(function()
{
$(this).disableTextSelect(); // disableTextSelect() is user defined function extending jquery
});
}
テーブルがすでにロードされている場合、これは正常に機能します。それをテーブルにアタッチするには、将来ロードされる場合は .on() を使用する必要があります。しかし、方法がわかりません:-(
$(document).on('which event?!', '#table_id thead th', function()
{
$(this).disableTextSelect();
});
どうもありがとう、ファントム