adds support to ie6 & 7 to the :before and :after pseudo selectors with no dependencies or special syntax
Download the production version or the development version.
In your web page:
<!--[if lt IE 8]><script type="tex/javascript" src="after.min.js"></script><![endif]-->
after.js checks if :after is unsupported in the current browser, and if so, it appends a span to every element with a :before or :after css rule, styling it appropriately.
- node.js
- npm
- phantomjs (only for running qunit tests as part of the build process)
- 'grunt', 'requirejs' and 'grunt-requirejs-tasks' npm packages. You can install these simply by navigating to the project root folder and typing:
npm install
to rebuild the file from source, navigate to the project root in terminal and run
grunt requirejs-concat
this will appropriately combine the source code in /src and create a concatinated and minified version in /dist
Copyright (c) 2012 Alan Clarke
Licensed under the GPL license.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
Please don't edit files in the dist
subdirectory as they are generated via grunt. You'll find source code in the src
subdirectory!
While grunt can run the included unit tests via PhantomJS, this shouldn't be considered a substitute for the real thing. Please be sure to test the test/*.html
unit test file(s) in actual browsers.
This assumes you have node.js and npm installed already.
- Test that grunt is installed globally by running
grunt --version
at the command-line. - If grunt isn't installed globally, run
npm install -g grunt
to install the latest version. You may need to runsudo npm install -g grunt
. - From the root directory of this project, run
npm install
to install the project's dependencies.
In order for the qunit task to work properly, PhantomJS must be installed and in the system PATH (if you can run "phantomjs" at the command line, this task should work).
Unfortunately, PhantomJS cannot be installed automatically via npm or grunt, so you need to install it yourself. There are a number of ways to install PhantomJS.
- PhantomJS and Mac OS X
- PhantomJS Installation (PhantomJS wiki)
Note that the phantomjs
executable needs to be in the system PATH
for grunt to see it.