Example 1: Simple jQuery Function
This example demonstrates a simple jQuery function that changes the background color of a code block on mouseover.
<script>
$(document).ready(function() {
$('.article').on('mouseover', '.code', function() {
$(this).css('background-color', 'lightblue');
});
$('.article').on('mouseout', '.code', function() {
$(this).css('background-color', '');
});
});
</script>