Trying to manipulate the iframe from a jQuery script running inside the iframe. Here is how to get a handle on the iframe with jQuery when you have id attribute iframe-id-attribute set on the iframe:
var ifr = $( '#iframe-id-attribue', window.parent.document );