I'm currently working on implementing a jQuery conditional to add a class to a specific element when another element contains a certain ID. Below is the code I have created so far:
<script type="text/javascript">
$(document).ready(function() {
if( $('.container-fluid').hasId('europe') === true )
{
$('controlBar_playerVideo1').addClass('darkcontrols');
}
});
</script>
You can view the live site here:
After adding the script to the footer, I encountered an "undefined is not a function" error in the console. It's worth noting that my knowledge of jQuery is very limited.
I would greatly appreciate any guidance or tips on how to achieve this functionality.