demography is a small script to add browser data to the body.
it uses bowser to detect browsers and adds the current browser plus version to the body tag as a class.
bower install demography
Four quick start options are available:
- download the latest release.
- clone the repo:
git clone https://github.com/andrezimpel/demography.git
. - install with bower:
bower install demography
.
<script src="http://code.jquery.com/jquery-1.9.0.js"></script>
<script src="path/to/bower_components/bowser/bowser.js"></script>
<script src="path/to/bower_components/demography/demography.js"></script>
<script src="... others"></script>
demography will automatically add classes to the body tag via jQuery.
here is the result (Safari 7):
<body class="safari safari7">
you well be able to use those classes in your css files or to run browser specific scripts after document ready.
andre zimpel
hit me up if you want to join!
code and documentation copyright 2011-2014 andre zimpel. code released under the MIT license.