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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:12:37+00:00 2026-06-10T04:12:37+00:00

Im trying to change title style for all links however i just found how

  • 0

Im trying to change title style for all links however i just found how to do it for <a> links not for forms , <td> and images titles neighter. Can any one help me to get it using jquery .. this is the code that i have:

    <!DOCTYPE html>
<html>
    <head>
        <title>Anchor Title Demo</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
        <script>

            $(document).ready(function() {

                $('body').append('<div id="anchorTitle" class="anchorTitle"></div>');

                $('a[title!=""]').each(function() {

                    var a = $(this);

                    a.hover(
                        function() {
                            showAnchorTitle(a, a.data('title')); 
                        }, 
                        function() { 
                            hideAnchorTitle();
                        }
                    )
                    .data('title', a.attr('title'))
                    .removeAttr('title');

                });



            });

            function showAnchorTitle(element, text) {

                var offset = element.offset();

                $('#anchorTitle')
                .css({ 
                    'top'  : (offset.top + element.outerHeight() + 4) + 'px',
                    'left' : offset.left + 'px'
                })
                .html(text)
                .show();

            }

            function hideAnchorTitle() {
                $('#anchorTitle').hide();
            }

        </script>

        <style>
            body {
                background-color: white;
                font-family: Helvetica, Arial, sans-serif;
                font-size: 14px;
            }
            /* title style
             */
            .anchorTitle {
                /* border radius */
                -moz-border-radius: 8px;
                -webkit-border-radius: 8px;
                border-radius: 8px;
                /* box shadow */
                -moz-box-shadow: 2px 2px 3px #e6e6e6;
                -webkit-box-shadow: 2px 2px 3px #e6e6e6;
                box-shadow: 2px 2px 3px #e6e6e6;
                /* other settings */
                background-color: #fff;
                border: solid 3px #d6d6d6;
                color: #333;
                display: none;
                font-family: Helvetica, Arial, sans-serif;
                font-size: 11px;
                line-height: 1.3;
                max-width: 200px;
                padding: 5px 7px;
                position: absolute;
            }
            * html #anchorTitle {
                /* IE6 does not support max-width, so set a specific width instead */
                width: 200px;
            }
        </style>
    </head>
    <body>


        <p>
            <a href="#" title="The title will appear in an box when the mouse is over the link">Hover over me</a>
        </p>
        <div>
            <input type="text"  title="The title will appear in an box when the mouse is over the link" name="styleSwitcher" placeholder="Hover over me" /><p></p><p></p>
             <dt title="The title will appear in an box when the mouse is over the link">Hover over me </dt>
        </div>

    </body>
</html>

DEMO: http://jsfiddle.net/NVENA/2/

  • 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-10T04:12:39+00:00Added an answer on June 10, 2026 at 4:12 am

    To make the code do the change for all elements with a nonempty title attribute, remove the element name a from

                $('a[title!=""]').each(function() {
    

    making it

                $('[title!=""]').each(function() {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As the title says, I'm trying to change the ID of all elements with
I'm trying to change the header title for a section in a UITableView when
I am trying to change my ipad apps button title programatically using the following
I´m trying to change a spring jsp example to use freemarker. I changed all
I'm trying to change the href attribute of all the a tags inside an
I'm learning css and trying to change background-color of all html except one div
I'm trying change an input mask for textbox when the the check box has
Am trying to change the button frame according to the orientation change but button
im trying to change font globally for whole application, the problem is, i am
I am trying to change the color of my draggable if it is reverting

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.