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 8934589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:49:35+00:00 2026-06-15T09:49:35+00:00

There is the following JQuery code: $(document).ready(function(){ $(.translated).mouseenter(function(){ $(this).html(<input type=’text’/>); }); }); And there

  • 0

There is the following JQuery code:

    $(document).ready(function(){
        $(".translated").mouseenter(function(){
            $(this).html("<input type='text'/>");
        });
    });

And there is the table with many <div class="translated"> items with text in it. I need to replace text in div block to input item by mouseenter event. It works. But I also need to set attributes for input element in the process of replacing, and I don’t know how I can do it because I’m new in JS/JQuery. Please, give me some info. Thank you in advance.

UPDATE: sorry, my attributes is calculated with JS too, it isn’t constant.

UPDATE 2:
Algorithm:
1) Insert input item in div item
2) Change height of the new inserted item

  • 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-15T09:49:36+00:00Added an answer on June 15, 2026 at 9:49 am

    For the record, there’s a special jQuery syntax for element creation.

    $("<input/>", {
        type: "text",
        height: 100
    }).appendTo(this);
    

    The above inserts an input element with type attribute set to text and height (CSS) set to 100px.

    The generated markup appended to the target element is:

    <input type="text" style="height: 100px;">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have the following jquery code: $(document).ready(function() { $('.restrictiveOptions input[type!=checkbox], .restrictiveOptions select').change(function() { //
this is my first question here. I have the following jquery code: $(document).ready(function(){ $(a).click(function(){
I have the following jquery code. var destTable = $(#numbers); $(document).ready(function() { $(#btnAdd).click(function() {
I have the following code: $(document).ready(function () { $(tr).live('click',function(){ alert(TR); }); $(input).live('click',function(){ alert(INPUT); });
In the jquery.cycle.js file, there is the following code: $.fn.cycle.transitions.scrollRight = function($cont, $slides, opts)
I am referencing JavaScript as follows on an HTML page: <script type=text/javascript src=http://code.jquery.com/jquery-1.6.1.min.js></script> <script
I have the following code: $(document).ready(function () { function loginLinkClick(e) { e.preventDefault(); $('#loginLink').unbind('click', loginLinkClick);
I have the following code: $(document).ready(function(){ $(window).scroll(function(){ Topo = $(window).scrollTop(); ObjScrollASoda.css({ 'marginTop' : (Topo
I have the following jquery code that I've embedded inside of a View: $(document).ready(
I found a weird behavior of jquery's html function. I have the following code

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.