I have a form with button as follows. Here click event is not triggered.
<form role="form" method="POST" id="exportform" action="{{ route('export_pdf') }}">
<input type="checkbox" name="dataoption[]" id="filled-in-box5" value="1" />
<input type="checkbox" name="dataoption[]" id="filled-in-box7" value="2"/>
<button type="button" class="btn-floating pdf-btn page"><i class="material-icons">picture_as_pdf</i></button>
</form>
<script type="text/javascript">
$(document).on('click',"[type='button'][class='page']",function(){
// do action
});
</script>
But when I change the code as
$(document).on('click',".page",function(){
// do action
});
or as
<button type="button" class="page"><i class="material-icons">picture_as_pdf</i></button>
$(document).on('click',"class['page']",function(){
// do action
});
it works. But I need to check both type and class to fire action. Why is this not possible when multiple classes exist? How can I make it work?