I am having an issue grabbing an element from another page using the jQuery load() function. I am only able to add client-side script to the page A (https://landing.pkr.com/en/bonus/) and am trying to grab an element from page B (http://letsplay.pkr.com/en/) which I am unable to edit.
I have the code below on page A:
$('#playerNumber').load('https://letsplay.pkr.com/en/ div.players.roundContainerBorderNone h2');
Page A runs on https protocol. Page B runs on both http and https.
My initial issue was that I was trying to grab the element from page B. The code was not working because the protocols were conflicting, however I changed the protocol to https and that mostly sorted the issue.
The only exception was when I tried to view the page in Chrome using an incognito window. For some reason the code was not functioning. Can someone explain to me why this would be and whether it is a cause for concern going forward? Is there a solution for this issue?
Many thanks
--- Additional Comment ------------------------------------------------------
Following further investigation it turns out that page B does not support https. Would this mean that the issue cannot be resolved?