I want to change the css of a div depending on the url you are at.
Here is the code I came up with...
<script>
if (window.location.href == "http://www.example.com/?tab-1") {
function(){
$('body').css('color','red !important');
}
}
</script>
Could someone explain how properly execute a function based on the current url?
Thank you.