Skip to content

Instantly share code, notes, and snippets.

@tjad
Created February 27, 2017 16:33
Show Gist options
  • Save tjad/73347c57896c7d4d4f33b6ddb4fae731 to your computer and use it in GitHub Desktop.
Save tjad/73347c57896c7d4d4f33b6ddb4fae731 to your computer and use it in GitHub Desktop.
Bootstrap 3
import {inject, customAttribute} from 'aurelia-framework'
@inject(Element)
@customAttribute('bs-tooltip')
export class BsTooltip {
constructor(element){
this.element = element
}
valueChanged(newVal, oldVal) {
$(this.element)
.attr('data-original-title', newVal)
.tooltip('fixTitle')
}
}
this.email = 'super@gm'
window.setInterval(()=>{this.email = (this.email == 'super@gm' ? 'nonsense@gm' : 'super@gm')}, 2000)
require from='../bs-tooltip-attribute.js'
span bs-tooltip.bind='email' Hello world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment