After searching through numerous posts on this website, I have yet to find a solution to my problem. My issue involves trying to implement a simple jQuery function that is not functioning as expected. It appears that the jQuery link may not be properly set up, although I am following the same process I always do. The goal is to change the background color of an unordered list within a specific div to orange. Despite my efforts, the color does not change at all. I even attempted using console.log
to troubleshoot, but it was unsuccessful. Could someone please review and provide assistance?
Here is my code:
<script src="jquery-1.12.0.js">
$(document).ready(function() {
console.log("Why isn't this working?")
$("#contentleft ul").css("background-color", "#FFA500");
});
</script>
<div id="contentleft">
<h3>My List Is Awesome</h3>
<ul>
<li><a href="http://www.fullsail.com">Full Sail</a></li>
<li><a href="http://www.cnn.com">CNN</a></li>
<li><a href="http://www.youtube.com">YouTube</a></li>
<li>No link here.</li>
</ul>
</div>