jquery - Styling a tooltip appearing in span -


i have span title attribute showing tooltip. showing default tooltip. want tooltip shown tooltip black background color , white text color.
how can that?

my span html looks this

<span class="bootstrap-switch-handle-on bootstrap-switch-success"        title="my span tooltip" style="width: 42px;">on</span> 

thanks , regards

you need use title text in css create new tooltip element. don't have add new el. use pseudo-selector such:

span:hover:after{ content: attr(data-title); display:block; //more width, height, background etc. here } 

then use data-title instead of title avoid double-tooltip.

here fiddle: https://jsfiddle.net/nyybsu1o/2/


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -