getContext(2d) from dynamically added canvas with jquery

前端 未结 1 972
执笔经年
执笔经年 2020-12-19 17:14

Bit of a newbie here and probably out of my depth but I\'m looping over some imported xml and appending a container with a div and then appending that with a canvas, I\'m th

相关标签:
1条回答
  • 2020-12-19 17:55

    You need native DOM object to do it.

    Try this;

    var ctx = $("#theCanvas").get(0).getContext("2d");
    
    0 讨论(0)
提交回复
热议问题