Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8705445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:21:35+00:00 2026-06-13T03:21:35+00:00

Hey guys I’m trying to make it so when you click on the existing

  • 0

Hey guys I’m trying to make it so when you click on the existing a href= it will paste the inner text to the textarea. Though of course if click that the a href it’ll lead to link so i made it so it’ll take out the href. So far I have this code

$(function(){
$(".username a").removeAttr("href").css("cursor","pointer");
var $paste = $('div.post h4 .username a span');
  $paste.click('')
});

Ok I guess thats a good start lol. Problem to me is, I don’t know how to add onClick=”” or whatever to make the function work on click ya know? or would .click work in general. of course i would need a function in the .click area. I don’t know what to place in there to create what text is inside the a tag… Can someone help me, if you use .append or or anything can you also give an explanation, I’m trying to learn as I go.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:21:36+00:00Added an answer on June 13, 2026 at 3:21 am
    $(function(){
        $('.username a').click(function(){ return false; });
        $('.username a').one('click', function(e){
                 //e is short for event
            e.preventDefault(); //will no longer follow through
            //You want to append the text of the anchor link into the textarea.
    
            var innerTxt = $(this).text();
            //need to trim whitespace from the string
            innerTxt = $.trim(innerTxt);
    
            var $obj= $('textarea'); //replace this with textarea selector
            $obj.val(
               $obj.val()+'\n@'+innerTxt
            );               
        });
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys this is my html code: <div class=nakupy> <li class=icn_kategorie><a href=#>Nákupy</a> <div class=sub_menu>
hey guys was hoping you could help me out. I am required to make
Hey guys so I'm trying to pass a picture of type .png as a
Hey guys I managed to get a text input and select box to updated
Hey guys I can't seem to get the syntax here right, I'm just trying
Hey guys i am currently working on an android app that will allow me
Hey guys I'm using python and I was just wondering how we can make
Hey guys I'm getting three things right now that I'm trying to take care
hey guys how to make these php html links codes possible. i have tried
hey guys I have the follow code in js: $(document).ready(function(){ $(.replyLink).click(function(){ $(#form-to-+this.id).html(htmlForm()).toggle(500); return false;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.