0

In my code dive error

$('.log').prepend('<div class="symbol sublog"> 
অনুগ্রহ করে একটি প্রতীক যুক্ত করুন (`~!@#$%^&*()_+-={}|[]\;:",./<>?')  <br></div>');

I cant understand whats problem with (`~!@#$%^&*()_+-={}|[]\;:",./<>?')

  • read http://stackoverflow.com/questions/2004168/escape-quotes-in-javascript – Nico Van Belle Mar 07 '17 at 09:18
  • Even if you think it isn't related to your problem, could you please edit the question and copy+paste the error message for us to see? Thank you! (Whatever, you forgot to escape the line feed and all the single quotes.) – Álvaro González Mar 07 '17 at 09:20

4 Answers4

0

change this

(`~!@#$%^&*()_+-={}|[]\;:",./<>?') 

to

(\`~!@#$%^&*()_+-={}|[]\;:",./<>?\') 

you have single quotes, this is the problem. You have to escape them. Full answer:

$('.log').prepend('<div class="symbol sublog"> 
অনুগ্রহ করে একটি প্রতীক যুক্ত করুন (\`~!@#$%^&*()_+-={}|[]\;:",./<>?\')  <br></div>');
Alexander_F
  • 2,831
  • 3
  • 28
  • 61
0

Replace ' with ". Single quote after অনুগ্রহ করে একটি প্রতীক যুক্ত করুন is breaking string.

$('.log').prepend('<div class="symbol sublog"> 
অনুগ্রহ করে একটি প্রতীক যুক্ত করুন ("~!@#$%^&*()_+-={}|[]\;:",./<>?")  <br></div>');
Chetan Gawai
  • 2,361
  • 1
  • 25
  • 36
0
<div class="log">
</div>

$(document).ready(function(){
$('.log').prepend('<div class="symbol sublog"> অনুগ্রহ করে একটি প্রতীক যুক্ত করুন (`~!@#$%^&*()_+-={}|[]\;:",./<>?`)  <br></div>');
});

Execution

Bilal Ahmed
  • 4,005
  • 3
  • 22
  • 42
0

You have single quotes at the end of

    (`~!@#$%^&*()_+-={}|[]\;:",./<>?') 

Hence replace ' with \' as given below

    $('.log').prepend('<div class="symbol sublog"> নুগ্রহ করে একটি প্রতীক যুক্ত করুন (`~!@#$%^&*()_+-={}|[]\;:",./<>?\')  <br></div>');
Arun D
  • 444
  • 3
  • 7
  • 23