title: Laravel 5.2 - render partial view with its own CSS& JS
body: <p>I searched on Mr GOOGLE but no luck,I want to load page contents with ajax.There are two sections which i need to render partially,</p>
  
  <ul>
  <li>List view</li>
  <li>Map view</li>
  </ul>
  
  <p>Here is my code.</p>
  
  <p>JS code:</p>
  
  <pre><code>$.ajax({
      method: 'POST',
      type : 'POST',
      url  : main_path+'/homeservices/getData_Map',
      beforeSend: function(){
      $(".se-pre-con").fadeIn("slow");
      },
      data: {'_token': $('meta[name=_token]').attr('content')},
      success :  function(data)
      {
        $('#map_hs').html('');
        $("#map_hs").html(data['map_data']);
        $('.list_overmap').empty();
        $('.list_overmap').html(data['list_data']);
       }
    });
  </code></pre>
  
  <p>Here is my Controller Code</p>
  
  <pre><code>public function getData_Map() {
      $input = Request::all();
      if(Request::isMethod('post') &amp;&amp; Request::ajax()) {
          $hs_list = $this-&gt;services_list-&gt;getHomeServices();
          $returnHTML = view('homeservices.mapcontents')-&gt;with('servicesMap', $hs_list)-&gt;render();
          $returnHTML_list = view('homeservices.listcontents')-&gt;with('servicesList', $hs_list)-&gt;render();
          return response()-&gt;json(array('success' =&gt; true, 'map_data'=&gt;$returnHTML,'list_data'=&gt;$returnHTML_list));
  
       }
  }
  </code></pre>
  
  <p>I have These files</p>
  
  <ul>
  <li>Template file <em>homeservices</em></li>
  <li>I have view file </li>
  <li>I have two partial files</li>
  </ul>
  
  <p>Here is my view file</p>
  
  <pre><code>@extends('layouts.homeservices')
  @section('content')
  &lt;div class="list_overmap"&gt;&lt;/div&gt;
  &lt;div id="map_hs" &gt;&lt;/div&gt;
  @endsection
  </code></pre>
  
  <p>Now, There are different css &amp; js files for each partial files.For example map view has there two extra files</p>
  
  <pre><code>&lt;link rel="stylesheet" href={{URL::asset('css/lightslider.css')}}"/&gt;
  &lt;script src="{{URL::asset('public/src/js/lightslider.js')}}"&gt;&lt;/script&gt; 
  </code></pre>
  
  <p>Now my code give me error</p>
  
  <pre><code>.lightSlider is not a function
  </code></pre>
  
  <p>SO my questions are</p>
  
  <ul>
  <li>Do i need to include the extra files in partial view only or in template file?</li>
  <li>What is the best place, where i should include js code &amp; file and css code and files related to those partial views?</li>
  </ul>
  
  <p>Note: Please help me solve my problem,i spent too much time to find solution before i post here.</p>