Skip to content

cheets/selectivizr

 
 

Repository files navigation

Selectivizr with Grunt JavaScript uglify task

This project is a fork of the original selectivzr by Keith Clark.

I have added Grunt for creating a production ready minified and compressed JavaScript file. Currently used version from Selectivizr is 1.0.3b.

You can use the minified file from build/selectivizr.min.js or clone this project and use Grunt to customize the build.

Things needed for building

Grunt uses NodeJS so you need to get that installed. Mac users can install NodeJS from Brew:

brew install node

This will also install npm that's needed for package management. To run the build:

  1. clone this project
  2. go the project folder
  3. npm install
  4. grunt
  5. new minified file is build into built/selectivizr.min.js

Here's also the readme from original selectivzr:

Selectivizr

CSS3 selectors for IE 6-8

selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8. Simply include the script in your pages and selectivizr will do the rest.

To use the library, you'll need to include one of the supported libraries:

  • jQuery (1.3+)
  • Dojo (1.5.0+)
  • Prototype (1.6.1+)
  • Yahoo UI Library (2.8.0+)
  • DOMAssistant (2.8.0+)
  • MooTools (1.3+)
  • NWMatcher (1.2.3+)

Then add the following conditional comment AFTER your stylesheets:

<!--[if (gte IE 6)&(lte IE 8)]>
  <script type="text/javascript" src="selectivizr.js"></script>
  <noscript><link rel="stylesheet" href="[fallback css]" /></noscript>
<![endif]-->

This adds the selectivizr.js and an optional fallback CSS file to IE6-8 while hiding for other browsers.

About

selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%