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

  • SEARCH
  • Home
  • 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 8039379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:33:03+00:00 2026-06-05T03:33:03+00:00

Could you please advice me a plugin or a solution on jquery. I need

  • 0

Could you please advice me a plugin or a solution on jquery.

I need to have an input field with email type. When entered it shows just like on image attached.

change on click

You can click on the change link and input will be shown again with this value.

What is the best way to do that?

Thanks!

  • 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-05T03:33:05+00:00Added an answer on June 5, 2026 at 3:33 am

    You could you a plugin like Jeditable or implement a custom solution like the following:

    HTML

    <label for="email">Email:</label>
    <div id="email">eugene@gmail.com</div>
    <a href="#" id="changeEmail" data-target="email">change</a>
    

    JS

    // Switch to Input //
    $('#changeEmail').bind('click', function(e){
    
        // Prevent Switch if Already Input //
        if ($(this).get(0).tagName != 'input') {
            var $target = $('#'+$(this).data('target')); // Get Target Element
            var val = $target.text(); // Get Current Target Value
    
            // Swap Elements //
            $target.replaceWith('<input id="email" type="text" value="'+val+'" />');
    
            // Hide Change //
            $('#changeEmail').hide();
        }
    });
    
    // Switch to Div //
    $(document).delegate('#email', 'blur', function(){
    
        // Prevent Switch if Input is Empty //
        if ($(this).val() != ''){
            $(this).replaceWith('<div id="email">'+$(this).val()+'</div>');
            $('#changeEmail').show();
        } else {
            $('#changeEmail').hide();
        }
    });
    

    UPDATED DEMO HERE

    I hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could someone please advice why i have a memory leak in this code? I
I have a html form and validated it using jquery bassitance plugin, then after
could you please advice how to track progress of file upload to HTTP Server?
could you please advice how to connect to development machine from device? I can
Please could someone advise me regarding this. I am currently using the accordion plugin
Could I get some advice with an authentication/authorisation design please? It's for a car
Could you please advice a Server against which I can test my Class which
Could you please advice me a tutorial or book to do a web site
Please advice: I write here part of JAVA language in args[0] could be capital
could you please advice how to verify in python if provided string correspond to

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.