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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:08:11+00:00 2026-06-16T07:08:11+00:00

I have a slider using this html syntax: <div id=theatre> <a class=sliderImg href=01.jpg />some-text</a>

  • 0

I have a slider using this html syntax:

<div id="theatre">
    <a class="sliderImg" href="01.jpg" />some-text</a>
    <a class="sliderImg" href="02.jpg" />another-description</a>
    <a class="sliderImg" href="03.jpg" />whatever</a>
    <a class="sliderImg" href="04.jpg" />whatever</a>
</div>

What I need to do is to hide the text of the a tags not the a tags themselves.

I got this but doesn’t work.

var imgCaptions = $("#theatre a.sliderImg").html();
$(imgCaptions).hide();

I can’t add a span because I use the content for some AJAX. The structure has to remain.

Many thanks for your help. Merry Xmas!

  • 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-16T07:08:12+00:00Added an answer on June 16, 2026 at 7:08 am

    I’d suggest:

    a.sliderImg {
        color: transparent;
    }
    

    You could also use the user-select CSS property to prevent the text being selected:

    a.sliderImg {
        color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        -o-user-select: none;
        user-select: none;
    }
    

    Or, possibly, use the unselectable attribute on the elements themselves:

    <a unselectable="on" class="sliderImg" href="04.jpg">whatever</a>
    

    Incidentally your HTML is malformed, the / should not be in the opening tag (that’s only in the opening tag for void elements, such as input or img).

    References:

    • user-select.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Jquery - UI slider like this the HTML <div id=slider1 class=slider></div>
I am using jquery Mobile 1.0. I have this html code. <label for=slider class=ui-hidden-accessible>
I have successfully implemented slider to my Cocos2D project using this resource . The
I have a responsive slider using FlexSlider. I also want the text under each
I have this simple html <!Doctype html> <head> <title>Uft-8</title> <meta charset=uft-8> <style type=text/css> .tr_deco{
I have this html code and want to use the text in the divs
I have been using this code here: $(document).ready(function(){ $('a[href*=#]').bind('click', function(){ var $href = $(this).attr('href')
I have got this slider some where of the internet, and i want to
I am using a very light jquery content slider but have no idea how
I have a Coda slider on one webpage (hand-crafted, not using the plugin, but

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.