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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:30:42+00:00 2026-05-24T00:30:42+00:00

My table looks like this: How can I get jquery to remove the dropdown

  • 0

My table looks like this:my table

How can I get jquery to remove the dropdown or clear the contents from the last cell if my first cell has a value in it? The dropdown should only appear if the first two cells are blank.

<table>
<tr>headings here</tr>
<tr>
 <td>name</td>
 <td>id</td>
 <td>other id</td>
 <td>status</td>
 <td>select location</td>
</tr>
<tr>
 <td>name</td>
 <td>id</td>
 <td>other id</td>
 <td>status</td>
 <td>select location</td>
</tr>
<tr>
 <td>name</td>
 <td>id</td>
 <td>other id</td>
 <td>status</td>
 <td>select location</td>
</tr>
</table>

EDIT

Got it. I needed a trim().

http://jsfiddle.net/RN5Dn/1/

  • 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-24T00:30:43+00:00Added an answer on May 24, 2026 at 12:30 am

    assuming that your table looks like

    <table>
        <tr>
            <td>soon it will fade away</td>
            <td></td>
        </tr>
        <tr>
            <td>Last Samurai</td>
        </tr>
    </table>
    

    you can do this

    $(function(){
        if(!$("table tr:first").find("td:first").text())
        {
            $("table tr:last").delay('1000').fadeOut("slow");
        }
    });
    

    you can remove the dropdown by selecting it and then removing it by using remove like

    $("#idOfYourDropDown").remove();
    

    here is the working fiddle http://jsfiddle.net/3nigma/uF7M5/4/

    in the fiddle i have used delay so that the value remains visible for a bit of time

    jquery :first

    jquery :last

    EDIT

    i am assuming that if there is no name you want to hide/remove the select location

    $(function(){
    
    $("table tr").each(function(){
    
        if(!$("td:first",this).text())
        {
            $("td:last",this).delay("1000").fadeOut("slow");
        }
    
    });
    
    });
    

    here is the fiddle http://jsfiddle.net/3nigma/uF7M5/3/

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

Sidebar

Related Questions

My fact table looks like this yesterday a yesterday a yesterday a yesterday b
My source table looks like this Id StartDate 1 (null) 2 12/12/2009 3 10/10/2009
If my table looks like this: CREATE TABLE `daily_individual_tracking` ( `daily_individual_tracking_id` int(10) unsigned NOT
My table structure looks like this: tbl.users tbl.issues +--------+-----------+ +---------+------------+-----------+ | userid | real_name
I have a table that looks like this: nid vid tid 1 2 3
I have a table that looks like this: <table> <thead> <!-- random table headings
I have a table that looks like this: |StreetName NR| NR | |Teststreet 34|
I have a table which looks like this: <table id='t'> <thead> .... </thead> <tbody
I have a table that looks like this: id count 1 100 2 50
I have a table that looks like this for about ~30 students: StudentID Course*

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.