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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:57:14+00:00 2026-06-08T17:57:14+00:00

I have a wordpress site, and a plugin uses cufon text replacement. (I’m not

  • 0

I have a wordpress site, and a plugin uses cufon text replacement. (I’m not entirely sure the actual way it does this, but it’s not important).

I’d like to use a “display:none” on only a specific word or two. For example, on the mobile theme, I’d like to change “Contact Us” to only “Contact”. The only way to hide this on the fly is by using the alt tag since there is no class or ID.

So can I use JavaScript to detect the alt tag “Us” and do a display:none? Sample code below.

<cufon class="cufon cufon-canvas" alt="Us" style="width: 20px; height: 14px; "><canvas width="32" height="17" style="width: 32px; height: 17px; top: -2px; left: -2px; "></canvas><cufontext>Us</cufontext></cufon>
  • 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-08T17:57:15+00:00Added an answer on June 8, 2026 at 5:57 pm

    If you know the tag of element your searching for (I assume you have this information) you can look up all those tags in the document and check the alt attribute value. When you find the particular element you’re searching for you can do what ever you please with it. In this example I changed the textContent property.

    (function () {
      var li = document.getElementsByTagName('li');
    
      for ( var i = 0, length = li.length; i < length; i++ )
      {
        if ( li[i].getAttribute('alt') === 'two' ) 
          li[i].textContent = 'New Text';
      }
    
    }).call(this);
    

    Live: http://jsbin.com/ixitut/2/edit

    You can also narrow the scope of this search by instead changing document to be a more specific tag.

    var searchWithin = document.getElementById(/**/)
    var tags = searchWithin.getElementsByTagName(/**/)
    

    https://developer.mozilla.org/en/DOM/element.getElementsByTagName

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

Sidebar

Related Questions

I'm running a Wordpress site with the Disqus plugin and I have decided to
I have a problem with a WordPress site that is not reading the meta
I've installed a plugin for Wordpress Titled CMS Press onto my Site. I have
I am working on a wordpress site, and I have downloaded a plugin called
I have a wordpress site with a plugin container. In the container there are
I have looked around the WordPress plugin site for some time and so far,
I have a wordpress site and I'm creating an HR plugin for the company
I have to upgrade a running wordpress site's wordpress CMS and some installed plugins.and
I have wordpress a site with a customized login page, the problem is when
i have an wordpress site and it have menus over there. what i want

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.