Why is my ajax request not working? [closed]

-2

<script type="text/javascript">
         
          $('#enviar').click(function(){

            $.ajax({
          type: 'post',
          data: '',
          url:'<?php echo base_url('admin/salvar_produto'); ?>',
          success: function(retorno){
          notify.showNotification('top','right')
        
      }
       })}
</script>
    
asked by anonymous 23.02.2017 / 17:55

1 answer

1

One thing that helps is to indent the code

<script type="text/javascript">

          $('#enviar').click(function(){

            $.ajax({
            type: 'post',
            data: '',
            url:'<?php base_url('admin/salvar_produto'); ?>',
            success: function(retorno){

              notify.showNotification('top','right')

            }
       })
 }/*faltou esse parenteses ->*/)
</script>
    
23.02.2017 / 18:01