javascript - Append text to iFrame body where users mouse is "blinking" -
i need append face icon body of iframe. problem having is set @ end of body, not user has insertion point.
here code have far,
<iframe style=""name="content" id="content" width="758" height="200" onload="javascript:load();"></iframe> function angleface() { $("#content").contents().find("body").append('<img title="angle" src="/media/angle.png" alt="angle">'); }
i want face set wherever users insertion point at. right face beingness set @ end of document.
side note - type iframe on submit transfered textarea entered database.
replace .find("body")
.find("*:focus")
. should give element has focus within iframe.
then add together element after using .after()
method.
$("#content").contents().find("*:focus").after('<img title="angle" src="/media/angle.png" alt="angle">');
javascript jquery
No comments:
Post a Comment