rough-stuff / wired-elements

Collection of custom elements that appear hand drawn. Great for wireframes or a fun look.
https://wiredjs.com
MIT License
10.44k stars 329 forks source link

How can I open dialog dynamically? #148

Closed merbin2012 closed 4 years ago

merbin2012 commented 4 years ago

I am using jquery, and I want to know how to open the wired-dialog dynamically.

pshihn commented 4 years ago

In plain javascript you can get a reference to the dialog, and then set open to true:

const dialog = document.querySelector('wired-dialog');
dialog.open = true;
merbin2012 commented 4 years ago

Thank you very much @pshihn, due to the unknown, I removed this library from my projects using images instead.