I am using parsley Js but unfortunately it's not working please help me how can i resolve that thanks.
console error
jquery-3.6.0.min.js:2 jQuery.Deferred exception: $(...).parsley is not a function TypeError: $(...).parsley is not a function at HTMLDocument. (http://localhost/permit-to-work/cms/public/branch/add:313:14) at e (https://code.jquery.com/jquery-3.6.0.min.js:2:30038) at t (https://code.jquery.com/jquery-3.6.0.min.js:2:30340) undefined
html view
<form class="form" action="{{$isEdit ? route('branch.update', [$branchs->id]) : route('branch.store')}}" method="post" autocomplete="off" >
@csrf
<input type="text" name="name" value="{{$branchs->name ?? old('name') ?? null}}" parsley-trigger="change" placeholder="Name..." class="form-control" required>
</form>
script
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="{{url('')}}/plugins/parsleyjs/parsley.min.js"></script>
<script>
jQuery(document).ready(function () {
$('.form').parsley();
});
</script>
I was facing the same issue. Using the CDN
instead of the min js worked for me.