I have following:
<iframe id="test">
<script>
variable='hi';
</script>
</iframe>
I need to know how can I access to a variable by jquery selector from the top window like this $("#test").variable ?
I have following:
<iframe id="test">
<script>
variable='hi';
</script>
</iframe>
I need to know how can I access to a variable by jquery selector from the top window like this $("#test").variable ?
You can try :
$("#test")[0].contentWindow.variable;