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 578: Make nyroModal iframe box worked from link produced from jquery html() function.
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by chenx.p...@gmail.com, Oct 16, 2011
What steps will reproduce the problem?
1. Use jQuery AJAX call for pagination, and nyroModal to view a modal form with iFrame.
2. When click to another page, jQuery use html(data) to load a data with link that support jQuery nyroModal plugin.
3. The link that produced from html(data), when clicked cannot do the nyroModal plugin.


What is the expected output? What do you see instead?

I want the nyroModal link can be used from jQuery html().
Example :

$('.nyroModal').nyroModal();

$("#test").html("<a href='test.php' class='nyroModal' target='_blank'>Test</a>");

In div with ID "test", from html() it showed a link "Test" and I want it can be clicked to show nyroModal box and with iFrame.

What version of the product are you using? On what operating system?

I am using nyroModal v2.0, latest jQuery, on Windows XP and xampp1.7.3.

Please provide any additional information below.

I need help so my nyroModal link can be clicked and output box, when the link is called from jQuery html() function. Thanks a lot for the help.
Oct 19, 2011
#1 chenx.p...@gmail.com
Hello All.

I have found the solution.

So, I don't call the nyroModal with jQuery event call, or what it is called.
Example : $('.nyroModal').nyroModal();
(I don't use this)


I make a function that if the function called, it will pop out nyroModal.

Here is my function, I will share it to anyone that needs it :)

function ajaxNyromodal(e){
	$.nmManual($(e).attr('href'), {
		callbacks: {
			initFilters: function(nm) {
				nm.filters.push('link');
				nm.filters.push('iframe');
			}
		}
	});
	return false;
}

The link should be like this :
"<a href='test.php' onclick='ajaxNyromodal(this);'>ClickMe</a>"

Hope it helps for anyone whom have the same problem like me.

Sorry for bad english.

Powered by Google Project Hosting