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>');
Fribu - Smart Solutions
  • 2,734
  • 3
  • 27
  • 60
0

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

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

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

Execution

Bilal Ahmed
  • 3,889
  • 3
  • 21
  • 40
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
  • 394
  • 2
  • 6
  • 22