Skip to content

Add/Remove css classes when something fixed is hovering your target div(s).

License

Notifications You must be signed in to change notification settings

cropcrop/jquery-switchstyler

Repository files navigation

switchstyler

A jQuery plugin to add/remove classes when your divs are on the right target.

See a live demo here!

Alt text

Getting Started

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>

About

Add/Remove css classes when something fixed is hovering your target div(s).

Resources

License

Stars

Watchers

Forks

Packages

No packages published