Link to home
Start Free TrialLog in
Avatar of PratikShah111
PratikShah111

asked on

SCRIPT1014: invalid character in jquery for IE 11

I am getting
IE11 throwing “SCRIPT1014: invalid character”  for the below line of code

`<div class="comment">
                <div class="${originClass}">
                    <p>${comment}</p>
                    <date><b>${sender}</b> ${date} <fromDB><divstyle= "visibility: hidden; width: 0px;">${fromDB}</div></fromDB></date>
                              
                </div>
            </div>`

looks like the issue is with "`". it works ok on chrome and firefox but IE seems to be having some issues with it.
Avatar of Juan Ocasio
Juan Ocasio
Flag of United States of America image

template literals are not supported in IE 11:

https://kangax.github.io/compat-table/es6/
so yes, it's about this character, just use simple quote or double quote escaping them inside the string if present
Avatar of PratikShah111
PratikShah111

ASKER

can you give an example on how this can coded. i tried using simple quote and double quote and its still throwing an error
ASKER CERTIFIED SOLUTION
Avatar of Juan Ocasio
Juan Ocasio
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial