My favorites | Sign in
Project Home Downloads Issues
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 220: Can't call javascript function inside a modal.
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Apr 2009


 
Reported by kbit...@gmail.com, Apr 19, 2009
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.')
}

Apr 20, 2009
Project Member #1 nyro...@gmail.com
You could simply use the endShowContent callback as follow:
$(function() {
	$.nyroModalSettings({
		endShowContent: function(elts, settings) {
			if (settings.url == '#test')
				aletMe();
		}
	});
});
Status: Fixed

Powered by Google Project Hosting