I was wondering, if I had say - 100 tooltips what would be the performance comparison if they were jquery or css based? From my understanding, with CSS tooltips, the physical tooltip is created for each item and hidden from view until a user hovers over it - while a jquery tooltip should be only one item that changes content when its hovered upon. Or am I wrong? What do you think I should go with? Thanks!
It all depends on how many elements will have tooltips and how often they are displayed. For example, if you have few elements to apply tooltips to and they are displayed often, your CSS approach will be better. If you have lots of elements to apply tooltips to and they are not displayed often, your JS approach will be better.
It also depends on the size of the tooltips. The only way to answer your question is to actually try both and see which performs best. Also consider JS is much slower in some browsers. IE 6/7 will not perform well with 50tooltips/s using JS. CSS will still not be great but likely better than JS. You need to try both implementations and test on various browser versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With