jQuery: added typing for fn