↗liujw163118/jquery-caret-position-getteryou can get the cursor caret offset position(i.e.x,y) by this plugin, even included index getter.