Skip to content

Commit

Permalink
Use alt without title attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
urin committed Feb 17, 2014
1 parent 1624595 commit 9bf5fbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion balloon.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"balloon",
"tip"
],
"version": "0.4.2",
"version": "0.5.0",
"author": {
"name": "urin",
"url": "https://github.com/urin"
Expand Down
4 changes: 2 additions & 2 deletions jquery.balloon.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* @author: Hayato Takenaka (http://urin.github.com)
* @version: 0.4.2 - 2014/02/09
* @version: 0.5.0 - 2014/02/17
**/
(function($) {
//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -200,7 +200,7 @@
(offTimer = $target.data("offTimer")) && clearTimeout(offTimer);
var contents = $.isFunction(options.contents)
? options.contents()
: (options.contents || $target.attr("title"));
: (options.contents || $target.attr("title") || $target.attr("alt"));
var isNew = !($balloon = $target.data("balloon"));
if(isNew) $balloon = $("<div>").append(contents);
if(!options.url && (!$balloon || $balloon.html() == "")) return;
Expand Down

0 comments on commit 9bf5fbb

Please sign in to comment.