javascript - jQuery contentEditable not working - Internet Explorer 8 - edit table items -


i need code working in internet explorer 8:

http://jsfiddle.net/tytqv/5/

$("tbody tr td").bind("click", onclick);  function onclick(e) {     if(e.currenttarget.contenteditable != null)     {             $(e.currenttarget).attr("contenteditable",true);     }     else     {             $(e.currenttarget).append("<input type='text'>");     } } 

it works fine in firefox or chrome not in ie8.

i tried changing bind() live() doesnt have effect - when click on list item doesnt (the event handler called, though)

if change contenteditable lowercase "contenteditable" appends text forms element every time clicked, not want.

the purpose of code make table items editable. ideas on how fix this?

thanks in advance!

td-elements cannot set contenteditable. check page reference: http://msdn.microsoft.com/en-us/library/ms537837(v=vs.85).aspx

you add empty div cell , make 1 contenteditable


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -