Foundation-sites: Windows 7 Internet Explorer 11 / 10: registerPlugin function SCRIPT 1014 error : Invalid character

Created on 19 Sep 2016  路  5Comments  路  Source: foundation/foundation-sites

I've created a sticky top bar per the Foundation 6 documentation. It works properly in Chrome and Firefox. In Windows 7 IE 11 and IE10 (the only ones tested), I get a javascript console error "SCRIPT1014: Invalid character" in foundation.js, Line 893, Column 33. This position will of course vary. This is the line:

  if (!plugin.$element.attr(`data-${ pluginName }`)) {

There doesn't seem to be anything wrong with this line to me, so I'm baffled. Lots of searching and couldn't come up with much to help me.

How can we reproduce this bug?

  1. Implement Sticky Topbar per documentation
  2. Open in Internet Explorer 11 or 10 on Windows
  3. The top bar navigation is not sticky, and the usual javascript implemented manipulation in code as not occurred. Console indicates above error.

What did you expect to happen?
Sticky top bar would stick to top edge of window, as it does in chrome/firefox.

Most helpful comment

Seems like you didn't transpile the code back to ES5. IE does not support template strings and therefore you will need to use e.g. Babel to generate ES5 JavaScript out of the ES6 JavaScript that Foundation is written in.

All 5 comments

Seems like you didn't transpile the code back to ES5. IE does not support template strings and therefore you will need to use e.g. Babel to generate ES5 JavaScript out of the ES6 JavaScript that Foundation is written in.

@mhair, where you able to get this working?

@Owlbertz Your answer helped me 馃憤

Closing based on the above conversation

Good to know: you do not need Babel for ie11 support. You just have to use the the js files from dist/js (compiled to ES5) instead of the source js (written with ES6).

Was this page helpful?
0 / 5 - 0 ratings