I need help with selecting an input field from iframe with jquery, the iframe looks like this :
<iframe src="https://checkout.klarna.com" id="klarna-checkout-iframe" name="klarna-checkout-iframe" class="kloading" scrolling="no" frameborder="0" style="height: 940px; width: 100%; transition: height 0.15s;"></iframe>
<input class="-test" type="text" name="challenge.postal_code" value="name">
<input class="-square" type="tel" name="challenge.postal_code" value="03434">
</iframe>
and I am using this jQuery code to get a input field :
<script type="text/javascript">
var iframe = $('iframe').contents()find('input[type=tel]')
</script>
and now for testing the input field I use this jQuery for change style of it :
$(iframe).style.border = '1px solid #000000'
I have tried many things to make it work, but I still cannot select the iframe, is there somebody here that can help me?