Monday, 6 March 2017

Onhover div display icons or other data in div using jquery,

  • Onhover div display icons or other data in div using jquery,
  • you can display div on div using jquery
  • you can add any icon on hover mouse to div
  • Attached screenshot also
 <div class='classnamehere'>
description will goes here..
</div>

<script>
$( ".classnamehere" ).hover(
  function() {
    $( this ).append( $( "<div class='message-hovers'><span><a href='https://google.com'><i class='fa fa-commenting-o' aria-hidden='true'></i></a><a href='https://google.com'><i class='fa fa-flag' aria-hidden='true'></i></a><a href='https://google.com'><i class='fa fa-clock-o' aria-hidden='true'></i></a>  </span></div>" ) );
  }, function() {
    $( this ).find( "span:last" ).remove();
  }
);
 
</script>

No comments:

Post a Comment