String from ajax execute as jquery -



String from ajax execute as jquery -

i create ajax phone call , receive string server (this string , chain):

thisitem.parent().parent().hide()

now want excecute jquery chain. believe eval() answer, understand that's dangerous?

so what's alternative? or eval() not unsafe purpose?

you can utilize http://code.google.com/p/jquery-json/ or https://github.com/douglascrockford/json-js library convert json javascript objects. browsers have native back upwards not of them. using tool recomended now.

jquery string chain

Comments