I have some JS that is working in all browsers except for IE.
When I open my console on that page, I get this error: SCRIPT1014: Invalid character
on the following line:
const template = `
This is the part it breaks on:
const template = `
<div class='row sortwrap'>
<div class='col-md-8'>
<input type='text' name='category[]' placeholder='' class='form-control name_list catinput' />
<i class='mdi mdi-sort dragndrop'></i>
<div class='questionlist questionwrap'>
<div class='row'>
<div class='col-md-8'>
<button class='btn btn-success questionbutton'>Extra vraag</button>
<input type='text' name='question[]' placeholder='1. Voeg een vraag toe' class='form-control name_list questioninput' />
</div>
<div class='col-md-4'>
</div>
</div>
</div>
</div>
<div class='col-md-4'>
<button id='addcategory' class='btn btn-danger btn_remove removebutton'>X</button>
</div>
</div>`;
const vraagTemplate = `
<div class="row" id="question">
<div class="col-md-8">
<input type="text" name="question[]" class="form-control name_list questioninput" />
</div>
<div class="col-md-4">
<button class="btn btn-danger btn_remove">X</button>
</div>
</div>`;
I tried using '
or "
but then it also stops working and I get this error:
SCRIPT1015: Unterminated string constant
On the same line.
What can I do about this?
I found this answer: IE11 throwing "SCRIPT1014: invalid character" where all other browsers work But everything I have is just plain HTML, and changing the quotes does not work.