How do I apply CSS styles to Raphael.js objects using jQuery?

后端 未结 3 949
小鲜肉
小鲜肉 2021-02-15 02:30

Does anybody have any experience with the Raphael.js SVG library?

I\'m using Raphael.js to create an SVG map (for use on smartphones) but I\'m having trouble opening the

3条回答
  •  天命终不由人
    2021-02-15 03:00

    I am not exactly sure what you code is doing, but if you want to get a jQuery object out of a Raphael object then do this:

    var $jQueryObject = $(raphaelObject.node);
    

    From there you can use jQuery to add a class:

    $jQueryObject.addClass('highlight');
    

提交回复
热议问题