Since you should not modify any mojoPortal code it would be better not to use our built in iframe module.
One could use the Html Content feature with the wysiwyg editor disabled from settings and put an iframe and supporting javascript right in the content which would give you full control over it.
As Edward Cheng showed, it would take custom javascript to produce the desired result.