-1

is there any way to Style the Title inside The Tag? i mean for an example :

<input type= "submit" id="submit" title= "submit your form">

i want to know is it possible to style this title inside the input tag?

  • 1
    You can with CSS3. Have a look here [How to change the style of Title attribute inside the anchor tag?](https://stackoverflow.com/questions/2011142/how-to-change-the-style-of-title-attribute-inside-the-anchor-tag) –  Oct 24 '17 at 05:11

1 Answers1

0

No. But you may try some trick with it.

$(document).ready(function(){
  var old_title;
  $('.title-styled').on('mouseover', function(){
    old_title = $(this).attr('title');
    $('.title-message').html($(this).attr('title')).css('visibility', 'visible');
    
    $(this).attr('title', '');
  });
  
  $('.title-styled').on('mouseleave', function(){
    $(this).attr('title', old_title);
    $('.title-message').html('').css('visibility', 'hidden');
  });
  
});
.title-message{
  visibility: hidden;
  padding: 10px;
  border: solid 1px #f9f9f9;
  box-shadow: 3px 3px 3px #1a1a1a;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type= "submit" id="submit" class="title-styled" title= "submit your form">

<span class="title-message"></span>

Other option:

If you want to use a jQuery plugins, visit this link.

Blues Clues
  • 1,694
  • 3
  • 31
  • 72