Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
calebjacob committed Feb 6, 2013
2 parents 2b4d6f4 + acc5b65 commit f108903
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
});

$('.tooltip').tooltipster({
content: '<img src="http://mediacdn.disqus.com/uploads/users/4210/450/avatar92.jpg?1359914706" width="20" height="20" />',
functionBefore: function(origin, continueTooltip) {
continueTooltip();
if (origin.data('ajax') !== 'cached') {
Expand Down
7 changes: 2 additions & 5 deletions js/jquery.tooltipster.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
}

// first, strip the title off of the element and set it as a data attribute to prevent the default tooltips from popping up
var title = $this.attr('title');
$this.data('tooltipsterContent', title);
var tooltipsterContent = $.trim(object.options.content).length > 0 ? object.options.content : $this.attr('title');
$this.data('tooltipsterContent', tooltipsterContent);
$this.removeAttr('title');

// if this is a touch device, add some touch events to launch the tooltip
Expand Down Expand Up @@ -270,9 +270,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

// get the content for the tooltip
var content = $this.data('tooltipsterContent');
if($.trim(object.options.content).length > 0) {
content = object.options.content;
}

// get some other settings related to building the tooltip
var theme = object.options.theme;
Expand Down
Loading

0 comments on commit f108903

Please sign in to comment.