Here is a way of adding tooltip on a div using built-in ellipsis
copytext
$('.mydiv')
.bind('mouseenter', function () {
var $this = $(this);
if (this.offsetWidth < this.scrollWidth && !$this.attr('title'))
$this.attr('title', $this.text()); });
For more Details Kindly visit http://findnerd.com/NerdDigest
copytext
$('.mydiv')
.bind('mouseenter', function () {
var $this = $(this);
if (this.offsetWidth < this.scrollWidth && !$this.attr('title'))
$this.attr('title', $this.text()); });
For more Details Kindly visit http://findnerd.com/NerdDigest
No comments:
Post a Comment