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 6: Questions about parameters and callback
3 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Apr 2008


 
Reported by herve.fr...@gmail.com, Apr 17, 2008
Hi,

Like see in your blog I will post my questions here (In english for a most
readable choice).

I was wondering how to use $.nyroModalSettings to change settings of the
modal. I think I'm doing something wrong in the syntax but cant say what.

My other questions was for the callback function. (I'm a little Noob in the
Jquery Universe ^^)

I've got to execute more codes at the end of a call back. Actually I'm
writing the lines before the end of the callback in je JS Files.

But is there another solution was made to make this ?

Sorry for the English :p.

And Thanks for this Plugin.

Bye.
Apr 17, 2008
Project Member #1 nyro...@gmail.com
To use the settings, you can see how works the youtube example in the demo page.
Basically, you'll do something like :
$(function() {
  $.nyroModal.settings.debug = true; 
  $.nyroModal.settings.minHeight = 300;
  // etc, you can change every default settings
});
You misstyped the name, maybe that was you error.

Regarding the callback, if you want simply execute somecode, maybe you better use the
simple callback, not the animation callback.
It's depend on when you want execute your code.
Be sure to read the callback section of the project homepage to know which one you
can use: http://nyromodal.nyrodev.com/#callbacks

If you have any other questions, don't hesitate to ask.
Labels: -Type-Defect Type-Other
Apr 17, 2008
#2 herve.fr...@gmail.com
Thanks for the settings I will test this very soon.

Concerning the callback I'm actually using the showContent callback, but to do what i
have to do I've modified the JS file.

I was wandering if there is another possibility like 

$.nyromodal.showcontent.add({
 myfunction();
 myotherfucntion();
});

Thanks ^^.
Apr 17, 2008
Project Member #3 nyro...@gmail.com
Let me know if you still have a problem with the default settings.

For the callback, the way you did was the good one.
I think create a function which will call the 2 others function is not a big deal.

The best way to do will be probably:
$.nyroModal.settings.showContent = function(elts, settings) {
  myFunction();
  myOtherFunctions();
};

or by using the nyroModalSettings function to update the settings of the current modal.

I think this kind of feature won't help many developpers, as you already have a way
to do it. Moreover it will increase the modal size for a too little improvement.
Apr 17, 2008
Project Member #4 nyro...@gmail.com
Oops, the code I gave you for the default settings was wrong, I forgot the '.fn' part.

Here is the correct code to use: 
$(function() {
  $.fn.nyroModal.settings.debug = true; 
  $.fn.nyroModal.settings.minHeight = 300;
  // etc, you can change every default settings
});

And for sure, the same foe the showContent callback.
Status: Fixed

Powered by Google Project Hosting