简体   繁体   中英

Open modal with javascript instead of link using a wordpress plugin

I am using the wordpress plugin Easy Modal

I can open a modal like that <a href="#" class="eModal-11">Open Modal</a> . Now I want to open the modal with javascript like that

if (var == true) { openmodal-11(); }

Is there a way I can do this, without looking at the plugin code? So I can "open" the class with javascript like fake clicking on the link.. I am kind of a newbe in coding...

Thank you

我发现此页面表明它使用的是普通jQuery插件方法来与页面元素进行交互,并且以下内容应该可以正常工作:

$('#eModal-11').emodal('open');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM