I am clearly being stupid. Please see below and tell me where I am losing it :-(
Html layout
<div class="the-variables">
<span class="asking">156.25</span>
<span class="bidding">144.82</span>
</div>
iFrame Layout
<iframe id="livetick" style="overflow-y: hidden;" src="http://dev.aatsol.co.za/live-feed/" scrolling="no" seamless onload="window.parent.scroll(0,0);" height="370" width="370" frameborder="0">
<p>Your browser does not support iframes</p>
</iframe>
And this is my javascript attempt
jQuery( document ).ready(function($) {
var iframe = document.getElementById('livetick');
/* var innerDoc = iframe.contentDocument || iframe.contentWindow.document; */
var innerDoc = iframe.contentWindow.document.getElementsByClassName('asking');
//alert (innerDoc.innerHTML);
//alert (innerDoc);
console.log(innerDoc);
});
For some strange reasons I fail to pull the two values from within the provided spans. They are handled on a remote website fluctuate based on various factors. I simply want to pull them on my website in a iFrame and copy the two values fro inside the iFrame to a section on my website footer.
In short: 1. Get values inside iFrame 2. Copy exact values to a section on my website footer (using jQuery / javascript)