Same hover function for multiple paths in Raphael

后端 未结 4 1056
情书的邮戳
情书的邮戳 2021-02-06 11:27

So I\'ve got my canvas and my paths:

var paper1 = Raphael(10, 50, 960, 560);

var mapShape1 = paper1.path(\"M339.098,175.503c0,0-55.555,58.823-16.34,75.163s227.4         


        
4条回答
  •  悲哀的现实
    2021-02-06 11:46

    $(mapShape1, mapShape2, mapShape3).live('hover', function() { });
    

    Live should work better with the dynamic elements added to the DOM hover doesn't work with elements created after, and 'on' only works with created dom elemetns with a 3rd parameter specified.

提交回复
热议问题