| Issue 220: | Can't call javascript function inside a modal. | |
| 2 people starred this issue and may be notified of changes. | Back to list |
|
Hi, i would like to call a javascript function inside my modal... any help
will be greatly appreciated. Thanks.
HTML
------------------------------------------------------
<a href="#test" class="nyroModal">Test</a></p>
<div id="test" style="display: none; width: 600px;">
<a href="#" onclick="alertMe();">Test</a>
</div>
JAVSCRIPT
------------------------------------------------------
function aletMe()
{
alert('Ahoy!!! you've got me.')
}
|
||||||||
You could simply use the endShowContent callback as follow: $(function() { $.nyroModalSettings({ endShowContent: function(elts, settings) { if (settings.url == '#test') aletMe(); } }); });