If you want to manipulate with the DIV inside the $.get function, you
can declare a local variable and put the reference to DIV in it...

(function($) {
        $.fn.myPlugin = function() {

                this.each(function() {
                        alert(this.id);

                        var that = this;

                        $.get("return.php",function(data) {
                                // now "this" is "that"
                                alert(that.id);
                                //do something with "this" & the
"data"
                        });
                });
                return this;
        };

})(jQuery);


You don't have to call the variable "that", but it's a nice name,
isn't it? :)

Reply via email to