title: how to call base_url in js file
body: <p>i want to call <code>base_url()</code> in js file because i want to call ajax in jquery</p>
  
  <p>its my php file</p>
  
  <pre><code>$.ajax({
          url: '&lt;?php echo site_url('home/update');?&gt;',
          data: {
          email:email 
          },
          type: "POST",
          success: function(data) {
              $('#feedback').text(data).css('color','green');
          },
  
          });       
           } 
          else
          {
              $('#feedback').text('insert a valid email').css('color','red');
          }
  
          });
  </code></pre>
  
  <p>but i want to call in js file but i am confused how can i fix this
  because we can't call tags in js file</p>