How to do a tooltip on an SVG generated by Raphael

后端 未结 4 1971
时光取名叫无心
时光取名叫无心 2020-12-05 02:55

I\'m doing a bit of a pedagogical exercise, converting XML to SVG with XSLT, Javascript and Raphael. I\'m sure it\'s the hard way...but it\'s educational.

The proble

4条回答
  •  时光取名叫无心
    2020-12-05 03:18

    If you use [title] attributes, it will wrap the elements with links making it easy to use tooltip plugins like qtip.

    var R = Raphael('canvas', 100, 100);
    R.path(path).attr({ title: 'Fancy tooltip' });
    
    $('#canvas a').qtip();
    

提交回复
热议问题