I have this iframe and put below it the script for a the .css() function to return some elements values inside the iframe but it's not functioning at all. Is it right how i set it? Any help appreciated.
<iframe class="container" style="padding: 0px; max-width: 1000px; overflow: hidden;
width: 940px; margin: -18px auto 0px; z-index: 3; position: relative; height: 340px;"
src="index_files/index.html"></iframe>
<script>
$( "div" ).click(function() {
var color = $( this ).css( "background-color" );
$( "#result" ).html( "That div is <span style='color:" +
color + ";'>" + color + "</span>." );
});
</script>