tags:

views:

56

answers:

1
+2  Q: 

jQuery and Firebug

I am using jQuery's cycle plugin, and found that I can call up the default for "speed" by typing this into Firebug's console:

$.fn.cycle.defaults.speed

>>> 1000

I would like to know how to call up the override I have for speed (I would like to reuse it later):

$('.xxx').cycle({
speed: 1700 });

If you have the answer, please let me know the steps taken to figure it out so I can understand Firebug better.

Thanks a bunch!

+1  A: 

I looked through the code and it doesn't appear that the calculated options are exposed anywhere. They're captured as a local variable in several functions after they are built, but I don't know how you would get at them. You could set breakpoints in the relevant parts of the (unminified) cycle code with Firebug and inspect the values, but I don't think you can get at them programmatically. In any event it would be easier to store them in a variable, then use that variable in the options that you provide.

var cycleSpeed = 1700;

$('.klass').cycle({ speed: cycleSpeed });
tvanfosson
Thanks for clearing my mind T! I thought I was going to loose it...
Jeffrey Karbowski