| Issue 196: | How to call nyroModal window manually? | |
| 2 people starred this issue and may be notified of changes. | Back to list |
|
Hi,
is it possible to call the nyroModal window manually?
Before:
<a href="test.htm" class="nyroModal">Test</a>
After:
<a href=# onClick="test('test.htm');">Test</a>
This leads to the javascript function "test":
function test(url){$nyromodal_whatever().load('url);}
and opens the nyro window with the requested url.
I ask for this because i got problems with nyro links in later loaded
content (just see issue 195 ).
Many thanks,
Damien
Mar 14, 2009
on of the way is :
<a href='test.htm' id='test'>Test</a>
$('#test').nyroModal(); }); by adding other nyroModal options if is necessary
you can also use nyroModalManual in click event of your element.
$('#test').click(function(e){
e.preventDefault();
$.nyroModalManual({
bgColor: '#3333cc',
url: $(this).attr('href')
});
return false;
});
|
||||||||
Yes it's possible... Everything is documented on the homepage : function test(url){ $.nyroModalManual({ url: url }); }