Getting the src
See original GitHub issueI’m trying to grab the src of the image generated, however, it only works after the 2nd click.
$("#apply").click( function(){
var src = qrcode._oDrawing._elImage.currentSrc;
console.log(src);
});
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
jQuery get the image src - Stack Overflow
I hope when I click the button, I can get the specific img src and show the img src in the div class...
Read more >How to get the value of src attribute in jQuery? - Tutorialspoint
To get the value of src attribute in jQuery is quite easy. We will get the src attribute of the img tag. This...
Read more >HTML img src Attribute - W3Schools
The required src attribute specifies the URL of the image. ... If you do not get permission to use it, you may be...
Read more >JQuery Get and Set Image Src Example Tutorial - NiceSnippets
We will show easy example of jquery get and set image src.The attr() method to get and change the image source in jQuery....
Read more >A 4-Minute Guide to the Img src Attribute in HTML
Learn how to use and troubleshoot any issues with the img src attribute in HTML.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
try this
const div = document.createElement(‘div’); new QRCode(div, “http://jindo.dev.naver.com/collie”); const src = div.children[0].toDataURL(“image/png”); console.info(‘src’, src);