Despite the fact that you code is a bit of a mess, your problem is just that
since you aren't defining the variable callback with var callback = ...,
it's being made a global variable, and as a global variable, each time you
call $(...).test1(...), you're overwriting callback. Same for ttt. Adding
On 25 Paź, 11:12, Erik Beeson [EMAIL PROTECTED] wrote:
Despite the fact that you code is a bit of a mess, your problem is just that
since you aren't defining the variable callback with var callback = ...,
it's being made a global variable, and as a global variable, each time you
call
Hi
I'm trying to create plugin for jquery...
I have almost everything, but when Im using my plugin on more then one
elements then I have problem...
You're not getting 'this' correct. Where you set 'b', 'this' is the
jQuery object, not an element. So 'b' is a jQuery object that wraps
You're not getting 'this' correct. Where you set 'b', 'this' is the
jQuery object, not an element. So 'b' is a jQuery object that wraps
three dom elements. Here's a hint:
(function($) {
$.fn.test2 = function(color) {
// 'this' is the jQuery object
return
4 matches
Mail list logo