<html><head><script type="text/javascript">function Update(){if( statement ){document.getElementById( 'foo' ).setAttribute( 'data-hint' , text1 );}else{document.getElementById( 'foo' ).setAttribute( 'data-hint' , text2 );}}</script></head><body><p class="hint--top" data-hint="something" onkeyup="Update()" id="foo">bar</p></body></html>
/** * source: ????.scss * * Defines a fixed width and line wrapping tooltip. * * Classes added: * 1) hint--250 * 1) hint--150 * */ .hint--150:after { line-height: 1.3em !important; min-width: 150px !important; max-width: 150px !important; white-space: normal !important; } .hint--250:after { line-height: 1.3em !important; min-width: 250px !important; max-width: 250px !important; white-space: normal !important; }