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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:11:31+00:00 2026-05-25T15:11:31+00:00

Structure is: <tr> <td><span id=smeal-12-12 class=sletindtastningfelt>X</span></td> <td><input type=text value=blabla></td> <td><input type=text value=blabla></td> <td><input type=text

  • 0

Structure is:

<tr>
   <td><span id="smeal-12-12" class="sletindtastningfelt">X</span></td>
   <td><input type="text" value="blabla"></td>
   <td><input type="text" value="blabla"></td>
   <td><input type="text" value="blabla"></td>
   <td><input type="text" value="blabla"></td>
</tr>
<tr>
   <td><span id="smeal-13-12" class="sletindtastningfelt">X</span></td>
   <td><input type="text" value="again"></td>
   <td><input type="text" value="again"></td>
   <td><input type="text" value="again"></td>
   <td><input type="text" value="again"></td>
</tr>

I want to show class “sletindtastningfelt” if you focus on some of the input fields within the same tr

And on blur the class should hide..

And it should use its own class “sletindtastningfelt” and not another tr’s class “sletindtastningfelt”

The table id is #diettable

  • 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-05-25T15:11:31+00:00Added an answer on May 25, 2026 at 3:11 pm

    I think this is what you want:

    $('input:text').focus(function() {
        $(this).closest('tr').find('.sletindtastningfelt').show();
    });
    $('input:text').blur(function() {
        $(this).closest('tr').find('.sletindtastningfelt').hide();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this structure on form, <input type=test value= id=username /> <span class=input-value>John Smith</span>
the html structure: <div id=test> <form> <input type=radio name=content class=s_code checked=checked /><span>code</span> <input type=radio
This is the structure of my HTML: <div> <span>Some text</span> <br/> <span>Not much text</span>
I have the following structure: <div id=1><input class=a></input><span class=b></span></div> <div id=2><input class=a></input><span class=b></span></div> <div
I have the following (simplified) HTML structure <td> <DIV class=t-numerictextbox> <DIV class=t-formatted-value>$0.00</DIV> <INPUT id=MyObj_PropertyName
Suppose we have a page with the following structure: <li id=A> <span class=some class>some
i have html structure like this <div> <span class=ic> <span class=ic>12345</span> </span> </div> i
So i have this structure html <span class=label data=data/support_icon.png> <span class=title>1 User/Location - 8Am
I have a HTML structure: <div class=mydiv>xx <span>test1</span> <span>test2</span> <div class=inerdiv> <span>inner span</span> </div>
I have the following DOM structure: /*:DOC += <div id='testDiv' class='testDivClass'><div id='innerTestDiv'></div></div><span id='testSpan' class='testSpanClass'><span

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.