Saturday, November 29, 2008

[jQuery] Re: jeditable tooltip for empty table cell becomes content

On Nov 29, 2008, at 7:26 AM, Rodent of Unusual Size wrote:

>
> New demonstration case for another problem I've noticed with
> jeditable:
>
> http://apache.pastebin.ca/1270021
>
> I'm making cells in a table editable, and passing jeditable a string
> for the hover tooltip. However, if the cell in question has no
> content (e.g., <td></td>) jeditable stuffs the tooltip into the
> element as its value.

"Click to edit" is also default value for parameter "placeholder".
Jeditable inserts the placeholder to element if it is empty (otherwise
there is nothing to click). If you really want the empty you can do
something like.

$('.edit').editable('http://www.example.com/save.php', {
placeholder : ""
});


--
Mika Tuupola
http://www.appelsiini.net/

No comments: