Implementation method of Jquery mouse to display full name

  • 2021-07-16 01:46:59
  • OfStack

Mode 1

Using mouseover, mouseout events


  //  Slide over the mouse to display the full name 
  var origin_name;
  $('.task_name').mouseover(function() {
    origin_name = $(this).text();
    $(this).text($(this).nextAll("input").val());
  }).mouseout(function() {
    $(this).text(origin_name);
  });

Mode 2

Use the title attribute of the a tag

< a title="xxxx" > Abbreviated name < /a >

The attribute value of title will be displayed when the mouse is sent


Related articles: