Attr checked after open jquery dialog does not work

Attr checked after open jquery dialog does not work

I am using jquery  1.11.2, I am trying to check a checkbox after opening the dialog if the value in a textbox is '1', but it works only the first time. 

I tried with jquery v1.8.3 then it works, I don´t know if I making a mistake or maybe is a bug.

I leave the source code here using the two versions.