Why .html() doesn't work with SVG selectors using jquery ?

前端 未结 2 1336
北海茫月
北海茫月 2020-12-30 03:50

Question can some one tell me how can i convert my SVG element to a string ?

i\'m using canvg to convert my SVG to an image.

it has to be re

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-30 04:32

    For the problem you are not getting your svg content,
    If only one svg chart is on page then use:

    $('svg').html();
    

    and if more than present then please see there is a div of highcharts_container because they create that svg charts. If you are using them.
    Then use:

    $('id of that div').html();
    

提交回复
热议问题