Search code examples
jqueryeventsonkeyup

Add button click as an event to this jQuery script?


Im working from this demo: http://kilianvalkhof.com/uploads/listfilter/

I want to add a button that empties the input text area when you click it. I can do this with jQuery's .val however the list doesn't filter. I think the code does the recalculation after a keyup event, so how can I add clicking a button as an event that listened for? Thanks


Solution

  • Works when I add this to my click function:

    $('input.filterinput').change();