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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:28:40+00:00 2026-05-21T17:28:40+00:00

I am trying to get a border added to the li when it is

  • 0

I am trying to get a border added to the li when it is clicked. Here’s my code.

<div class="noselect round" id="teach_edit_navigation_holster">
<ul id="teach_edit_navigation">
    <li id="edittab_one" class="teach_nav_roundleft">
        <span>Item</span>
    </li>       
    <li class="" id="edittab_two">
        <span>Item</span>
    </li>   
    <li class="" id="edittab_three">
        <span>Documents</span>
    </li>   
    <li class="" id="edittab_four">
        <span>Item</span>
    </li>   
    <li class="" id="edittab_five">
        <span>Item</span>
    </li>   
    <li class="teach_nav_roundright" id="edittab_six">
        <span>Item</span>
    </li>                   
</ul>
</div>

Here’s the Jquery. I want the whole li box to have a border on it, not the span. The code below is putting a border on a span. I don’t know how to select the actual li. THank you!

  $(document).ready(function () {
  $('#edittab_two_s, #edittab_three_s, #edittab_four_s, #edittab_five_s, #edittab_six_s').hide();
//  $('#teach_edit_navigation').find('#edittab_one').css({
//            "background-color": "black"   // set highlight to first item on page "home"
//        });
});

$('#teach_edit_navigation_holster li').click(function () {
    var Vinfotab = this.id + '_s',
        $this = $(this);
    $('.edittab:visible').fadeOut('fast', function () {
        $('#' + Vinfotab).fadeIn('fast');
        $('#teach_edit_navigation_holster li span').css({
            "border": "none" // reset all to default color
        });
        $this.find('span').css({
            "border-bottom": "1px solid black"   // set highlight to this element only
        });
    });
});
  • 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-21T17:28:40+00:00Added an answer on May 21, 2026 at 5:28 pm

    The <li> is represented by $this. This should work for you:

    $('#teach_edit_navigation_holster li').css({ // !!! remove span
        "border": "none" // reset all to default color
    });
    $this.css({ // !!! remove .find('span')
        "border-bottom": "1px solid black"   // set highlight to this element only
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I am trying to get a border around buttons on my page when
I'm trying to get phpExcel to draw a border around a bunch of cells.
So i am trying get 2 div-containers which both should contain centered text (Both
I am trying to get rid of the thin border that appears for every
I am trying to get the border radius property to work properly on a
i am trying to get the bottom border one color but because in the
I am trying to get the ID attribute of anchors which has class current,
I trying to get the image border to go away on a submit button
I am trying to get a curvy border that works in all browsers which
I am trying to get rid of the border space between the cells. I

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.