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
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
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
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