Tooltips shouldn't stay visible after clicking

This commit is contained in:
Mark McDowall 2014-05-17 23:00:04 -07:00
parent 6ee876392c
commit 34ca5d4014
2 changed files with 35 additions and 8 deletions

28
src/UI/Shared/Tooltip.js Normal file
View file

@ -0,0 +1,28 @@
'use strict';
define(
[
'jquery'
], function ($) {
return {
appInitializer: function () {
console.log('starting signalR');
$('body').tooltip({
selector: '[title]',
container: 'body'
});
$(document).click(function(e) {
if ($(e.target).attr('title') !== undefined) {
return;
}
$('.tooltip').remove();
});
return this;
}
};
});