Book Image

Responsive Web Design by Example : Beginner's Guide

By : Thoriq Firdaus
Book Image

Responsive Web Design by Example : Beginner's Guide

By: Thoriq Firdaus

Overview of this book

Table of Contents (16 chapters)
Responsive Web Design by Example Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – patch Internet Explorer with polyfills


Perform the steps to patch Internet Explorer with polyfills:

  1. We have a number of polyfills in the scripts folder namely html5shiv.js, respond.js, and placeholder.js. Let's combine these scripts into a single file.

  2. First, create a new JavaScript file named polyfills.js that will hold the content of those polyfill scripts.

  3. Open polyfills.js in Sublime Text.

  4. Add the following lines to import the polyfill scripts:

    // @koala-prepend "html5shiv.js"
    // @koala-prepend "respond.js"
    // @koala-prepend "placeholder.js"

    Note

    The @koala-prepend directive is the Koala proprietary directive to import JavaScript files. Read more about it in the Koala documentation page at https://github.com/oklai/koala/wiki/JS-CSS-minify-and-combine.

  5. In Koala, select polyfills.js, and click on the Compile button, as shown in the following screenshot:

    By this step, Koala will have generated the minified file named polyfills.min.js.

  6. Open index.html, and link polyfills.js before...