title: how to pass value from javascript to html?
body: <p>I am trying to pass value to html id attribute.
  So, I am getting value from laravel php controller </p>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>        $("ul.nav-tabs &gt; li &gt; a").click(function() {
          // alert($(this).attr("href").replace("#", ""))
          var id = $(this).attr("href").replace("#", "");
          console.log(id);
  
          if(id) {
              $.ajax({
                  url: "{{ route('user.schedule.getId') }}",
                  type: "GET",
                  data:{'id':id},
                  dataType: "json",
                  success:function(data) {
                      console.log(data);
  
                  }
              });
            }
         });
  </code></pre>
  
  <p><strong>html Blade</strong></p>
  
  <pre><code>                     &lt;ul class="nav nav-tabs tabs_content"&gt;
                              @foreach ($routes as $route)
                                  &lt;li &gt;
                                      &lt;a href="#{{ $route-&gt;id }}" id="ad" data-toggle="tab"&gt;
                                          {!! $route-&gt;name !!}
                                      &lt;/a&gt;
                                  &lt;/li&gt;
                              @endforeach
                          &lt;/ul&gt;
                          &lt;div class="tab-content blog_tabs"&gt;
                              &lt;div class="tab-pane" name="schedule" id="tab-{{ $route-&gt;id}}" &gt;
  
                                  @foreach ($tabSchedule as $schedule)
                                      &lt;ul class="list-group"&gt;
                                          &lt;li class="list-group-item"&gt;{{ $schedule-&gt;schedule_number}}&lt;/li&gt;
                                      &lt;/ul&gt;
                                  @endforeach    
                              &lt;/div&gt;
                          &lt;/div&gt;
  </code></pre>
  
  <p>so here is picture of what i want to pass:</p>
  
  <p><a href="https://i.stack.imgur.com/8kyqJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8kyqJ.png" alt="enter image description here"></a></p>