A jQuery plugin to add/remove classes when your divs are on the right target.
See a live demo here!
Download the production version or the development version.
In your web page:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="dist/switchstyler.min.js"></script>
<script>
$('.fixed-element').switchstyler({
on: '.target1, .target2',
addClass: 'class1 class2',
removeClass: 'class3'
});
</script>