Jump to content
abdallaham

select() method in jQuery

Recommended Posts

Every time you click the button it appends new text after the input. This is the line of code that's responsible:

$("input").after(" Text marked!");

Share this post


Link to post
Share on other sites

You can wrap the text within a span element with a specific class, then remove that element with the class completely before appending the text in span again.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...