[jquery-dev] Re: Plugin local variables

2009-04-12 Thread Julian Aubourg
A usual technique for having variables local to a plugin is to use function scoping like this: (function($) { var firstVar = ...; var secondVar = ...; $.pluginFunction = function() { ... }; })(jQuery); 2009/4/12 Alexandre Marinho > > Hi, i'm tring to reproduce a library of mine fr

[jquery-dev] getJSON call is not going in the call back function

2009-04-12 Thread neerav
Hi All, I have the this getJSON function:- $.getJSON("url", {onlyShow:selectedPromotion,orderBy:selectedSortType},function(json) {alert('json data'+json.data); }); but when i call this function it is able to get the JSON data but when put any alert in the callba

[jquery-dev] Plugin local variables

2009-04-12 Thread Alexandre Marinho
Hi, i'm tring to reproduce a library of mine from Prototype to JQuery. It's a script to animate images in a container with a few effects... but I'm having some troubles with plugin local variables. The thing is that is working only when there is one container, with more than one the variables are

[jquery-dev] Re: Dimensions methods return 0 if a parent has display: none

2009-04-12 Thread Danny
I've been bitten by this issue; the documentation definitely needs to mention this explicitly. Leaving it unfixed is reasonable as long as it's documented. It would help to document the jQuery.swap method, which is the easiest way to get around the problem (going up the tree, doing swap at each st