Just started using jQuery for the first time and I'm encountering an issue. I'm trying to load content from an external element onto my page, and while it loads correctly, I'm having trouble using normal traversal methods on the loaded elements. Here's what I have:
<div id="area"></div>
<script type="text/javascript">
$("#area").load("externalPage.html #externalElement > *");
$("#area").find("ul").first().css("display","none");
</script>
The second line of the script doesn't seem to be working as expected. Could it be related to the order of operations being carried out?
I'm integrating this into a custom HTML module on the Blackboard LMS, which tends to act unpredictably with complex scripting. This might just be another one of those instances. Appreciate any insights on solving this! Thanks!