When i add onclick to my jquery it goes wrong

When i add onclick to my jquery it goes wrong

I have this code that works fine but as soon as i add values to the openInDialog functioni get errors.

Here it is without the values

  1. function putContent(data){
  2.         jQuery('#dis-wrapper').empty();
  3.         for(var i= 0 ;i<data.length;i++){
  4.            jQuery('#dis-wrapper').append('<div class="list-group-item"><a href="#"  onclick="openInDialog();"><h4 class="list-group-item-heading">'+ data[i]['Title'] +'</h4></a><div class="list-group-item-text">'+data[i]['Created']+'</div></div>');

  5.         }
As soon as i add values like this i get the following error

uncaught SyntaxError: Unexpected token ILLEGAL

And for information if i use the onclick with a static html page it works fine

  1. function putContent(data){
  2.         jQuery('#dis-wrapper').empty();
  3.         for(var i= 0 ;i<data.length;i++){
  4.            jQuery('#dis-wrapper').append('<div class="list-group-item"><a href="#"  onclick="openInDialog(500,600,true,true,true,'/sites/ddeb/dispform.aspx?ID=1);"><h4 class="list-group-item-heading">'+ data[i]['Title'] +'</h4></a><div class="list-group-item-text">'+data[i]['Created']+'</div></div>');

  5.         }
  6.     }