This is a Continuation of http://stackoverflow.com/questions/1255596
Please respond here.. this is my 'real' account..
I'm trying to assign different parameter values to different divs on which I have enabled the jQuery plugin 'Jeditable'. I can't get it to work, I'm sure its something simple.. but I can't figure it out..
How do I acheive it?
Given the following DOM element:
<div class="editme" id="theone" rel="test"></div>
These various snippets produce the following dafault placeholder texts for the above empty div:
$('.editme').editable('savedata.php',{
placeholder : "txt - "+$(this),
}
);
// outputs: "txt - [object Object]"
$('.editme').editable('savedata.php',{
placeholder : "txt - "+this,
}
);
// outputs: "txt - [object HTMLDocument]"
$('.editme').editable('savedata.php',{
placeholder : "txt - "+$(this).html(),
}
);
// outputs: "txt - undefined"
$('.editme').editable('savedata.php',{
placeholder : "txt - "+$(this).attr('rel'),
}
);
// outputs: "txt - undefined"
$('.editme').editable('savedata.php',{
placeholder : "txt - "+this.attr('rel'),
}
);
// outputs: "" (NULL / EMPTY STRING, must be due to error)