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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:53:16+00:00 2026-06-10T10:53:16+00:00

Ok, I have an <a tag that calls a toggle function to remove a

  • 0

Ok, I have an <a tag that calls a toggle function to remove a <td tag. In that a tag I have &lt;&lt;…<<

In the function I want to change the << to >> when the toggle is performed. Its not working. What am I doing wrong?

html:

<td class="filter_td" id="filter_td">
  <td class="show_hide">
            <a href="javascript:toggleFilters();" id="show_hide" alt="Hide Filters" title="Hide Filters">&lt;&lt;</a>
        </td>

jquery:

   function toggleFilters()
{
    var td = $("#filter_td");
    td.toggle('slow');
    if (td.css("display") == "none")
    {
        $("#show_hide").html("&gt;&gt;").attr('title', 'Show Filters');
    }
    else
    {
        $("#show_hide").html("&lt;&lt;").attr('title', 'Hide Filters');
    }
}
  • 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-10T10:53:17+00:00Added an answer on June 10, 2026 at 10:53 am

    Put your code that changes the text into the callback for “toggle”. That way, you know the animation is complete and the element’s visible state is complete. Something like this:

    var td = $("#filter_td");
    td.toggle('slow', function () {
        if (td.not(":visible"))
        {
            $("#show_hide").html("&gt;&gt;").attr('title', 'Show Filters');
        }
        else
        {
            $("#show_hide").html("&lt;&lt;").attr('title', 'Hide Filters');
        }
    });
    

    Also, I changed the check for it being hidden to jQuery’s “.not()”. This is a more general way of telling if an element is actually visible on the page, instead of simply looking at its styling (which may not be defined).

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

Sidebar

Related Questions

I have a button with remote=>true that calls a popup (a jquery popup, not
I'm working with MVC, I have a view with an ActionLink that calls an
I have the following code that calls the function uint32_pack. This program compiles with
I have span element <span class=tag onclick=clickTag(this) tagType=property> Which calls the clickTag method function
I have a href tag that goes like this : href=download.php?file={$sp->attachment_1}&flag=ds&r_id={$userid}&scpl_id={$sp->sp_id}; that works and
I have different JavaScript function associated with each option tag to toggle layers on/off
I have XML tag that has the content which is HTML document. <xml-tag> <!--
I have a problem with accented letters. For example: I have a tag that
Well i have a div tag that i show as a modal dialog this
In my HTML code, I have a form tag that contains two input boxes,

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.