dimanche 12 novembre 2017

My Javascript code is not running in laravel

I am working on a Laravel project and my Javascript code is not wording. I have applied the alert and it is not showing. When the user will click the button it will show the alert and it is not showing.

 @extends('layouts.app')

 @section('content')
 <div class="container">
   <div class="row">
    <div class="col-md-8 col-md-offset-2">
        <div class="panel panel-default">
            <div class="panel-heading">Dashboard

            <button id="read-data" class="btn btn-info pull-right btn-xs">Load Data By Ajax</button>
            </div>

            <div class="panel-body">
            <table class="table table-bordered table-striped table-condensed">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>First Name</th>
                        <th>Last Name</th>
                        <th>Full Name</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>

                    </tr>
                </tbody>
            </table>
            </div>
        </div>
    </div>
   </div>
   </div>
       @endsection

       @section('script')

     <script type="text/javascript" charset="utf-8">
      $('#read-data').on('click', function(){

      alert('sdsdsd');

      });
       </script>


    @endsection

The alert is not showing.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2zBIGuQ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire