Function that keyup on search doesn't work.

Function that keyup on search doesn't work.

Hwan LeeHwan Lee Posts: 7Questions: 5Answers: 0
edited December 2016 in Free community support
<script type="text/javascript">
$(document).ready(function() {
    $('#dataTables-example').DataTable({
        "searching" : true,
    });
</script>

I made 'search bar' through this code.
and I wrote code for use search value.

<script type="text/javascript">
$(function(){ 
    $('input[type=search]').keyup(function(){ 
        var searchVal = $(this).val(); 
        alert(searchVal);
    }); 
}) 
</script>

but alert doesn't work!!
keyup, keydown, keypress function too!!

help me T_T

Answers

  • allanallan Posts: 63,226Questions: 1Answers: 10,416 Site admin

    help me T_T

    Happy to. Please follow the forum rules and link to a test case showing the issue.

    Information on how to create a test page, if you can't provide a link to your own page can be found here.

    Thanks,
    Allan

This discussion has been closed.