I have the following HTML code:
<body>
...
<div id="users">
<iframe src="http://control.intranet/userlist.php" height="100">
</div>
...
</body>
Where the //control.intranet/userlist.php
loads a list of users from our intranet control panel.
This list looks like this:
<div class="user">
<span class="name">Boda Cydo</span>
<span class="ip">10.42.12.2</span>
...
</div>
<div class="user">
...
</div>
...
Now I want to format how the userlist looks, so I try to match elements in it with jQuery:
$("#users .name").css("background-color", "#FF0000")
But it never matches a single .name
.
I even tried just $("#users").length
and it returns 0.
This makes me think that I can't edit DOM elements loaded via iframe with jQuery. Is that true? If so, how do I edit CSS of elements that are loaded via iframe?
Thanks, Boda Cydo.