Skip to content

Instantly share code, notes, and snippets.

@artburkart
Last active August 29, 2015 14:05
Show Gist options
  • Save artburkart/55c58099e6f6fe68ff8b to your computer and use it in GitHub Desktop.
Save artburkart/55c58099e6f6fe68ff8b to your computer and use it in GitHub Desktop.
ember with bootstrap tooltip
(function () {
'use strict';
/* Very simple integration, you can add more of the options to
* the component from the list in the 'Options' section of
* http://getbootstrap.com/javascript/#tooltips-usage
*
* Usage:
* <button type="button">{{#bs-tooltip title="tooltip text"}}Words{{/bs-tooltip}}</button>
*/
App.BsTooltipComponent = Ember.Component.extend({
placement: 'top',
title: '',
didInsertElement: function () {
return this.$().tooltip({
'placement': this.get('placement'),
'title': this.get('title')
});
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment