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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:23:49+00:00 2026-06-11T04:23:49+00:00

I use jQuery 1.7.2 and UI 1.8.21 with tabs plugin. I have three tabs

  • 0

I use jQuery 1.7.2 and UI 1.8.21 with tabs plugin.

I have three tabs and each tab got a table with span with I want to hide/show based on value of some javascript variables.

It works ok on the first tab but second and third doesn’t. I used the same function to toggle on/off the span.

I am not able to reproduce this issue on jsfiddle. It works ok.

function toggle_svn_user(codebase){

    if (codebase=="trunk" && user==trunk_svn_user){
        $('#'+codebase+"_svn_user").hide();
        $('#'+codebase+"_svn_relocate_cmd").hide();

        //$('#'+codebase+"_svn_user").css('display', 'none');
        console.log("hide "+codebase);
        console.log($('#'+codebase+"_svn_relocate_cmd").attr('style'));
    }else{
        $('#'+codebase+"_svn_user").show();
        $('#'+codebase+"_svn_relocate_cmd").show();
    }
 }

there are two more if blocks for the other two tabs. This works for ‘branch’ codebase. So I started to debug it with ‘trunk’ codebase.

toggle_svn_user() function runs in $(document).ready(function(){ block. I also added button to trigger the function any time. This gives me the same result. What is strange that console.log() shows display: none; but when I use firebug to see the html I can see display: inline;. I can click the button and console.log and html doesn’t match.

I tried to use jQuery’s .hide(), .css('display', 'none'); and also .css('display', 'none !important'); Nothing helped. I tried to use my application with tabs with the same result.

Any idea how to fix that? Or how to show/hide the span?

<span class="" id="trunk_svn_user">svn user:<span id="trunk_svn_user_value"></span></span>';
  • 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-11T04:23:51+00:00Added an answer on June 11, 2026 at 4:23 am

    My guess is that one of the other if blocks might be interfering – does it work if you comment out the other cases?

    On a side note you can use jQuery’s toggle method to simplify your code.
    See the third usage .toggle( showOrHide ) on this page: http://api.jquery.com/toggle/

    Here is an example:

    function toggle_svn_user(codebase){
    
        if (codebase=="trunk"){
            var showUser = (user == trunk_svn_user)
    
            $('#'+codebase+"_svn_user").toggle(showUser);
            $('#'+codebase+"_svn_relocate_cmd").toggle(showUser);
    
            console.log($('#'+codebase+"_svn_relocate_cmd").attr('style'));
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have multiple tabs with different forms and I use Jquery selectBox plugin inside
I use jQuery form validation plugin . I have got a webpage with save
I'd like to use jquery ui tabs plugin, but not have it changing the
I want to use jQuery Validation Plugin with jQuery UI Tabs . How I
I want to use tabs on my page where clicking on each tab switches
I want to use Jquery UI Tabs to make three tabs that all contain
I use jQuery dynamically create tabs, but each time I click one tab, it
I'm making use of the jQuery Tabs plugin along with the History plugin, to
I want to use jQuery tabs ( http://jsfiddle.net/43FcS/2/ ) inside a div that's created
I like to use JQuery for creating tabs. My issue is all jquery tab

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.