title: Trying to pass information to laravel ajax jquery function based on html declared value
body: <p>im beginner in laravel/ajax, and trying to declare object.name inside the html class objectbutton, and if its clicked, to pass object.name to another function that will show object.name in    the content-area div.</p>
  
  <pre><code>$(document).on('click', '.block-button', function(){
                  // access current block instance by listening to touched class
                  var block_id = $(this).attr('block-id');
  
      $.ajax({
                      // laravel route access
                      url: '{{ route("content:page") }}',
                      type: 'get',
                      data: {input_block: block_id},
                      beforeSend:function(){
                          //in jquery . for class and # for ID
  
                          //LOADING TEXT
                          $('#content-area').html('Loading........')
                      },
                      success: function(result){
                          $('#content-area').css('background-color', result.color);
  
                          var blockInfos = '&lt;h3&gt;'+result.name+'&lt;/h3&gt;&lt;h3&gt;'+result.content+'&lt;/h3&gt;';
  
                          //Loop over objects if exist
                          var objectsInfos = '';
                          if (result.objects.length &gt; 0) {
  
                              //Loop
                              $.each( result.objects, function( index, object ){
                                  objectsInfos = objectsInfos + '&lt;div&gt;&lt;a href="" class="object-button" id="'+ +object.name+ '"&gt;'+object.name+'&lt;/a&gt;&lt;/div&gt;';
  
  
                              });
                          }
  
  
                          $('#content-area').html(blockInfos + objectsInfos);
                      }
  
  
                  });});
  </code></pre>
  
  <p>as you can see on the code im tryign to pass object.name inside the id of the html, is there any way to place object.name inside the html link so i can retrieve it with another onclick function, how this would work? im not sure if this is possible to do in this way with html. Thank you!</p>