search via button click

search via button click

akasaintmeakasaintme Posts: 1Questions: 1Answers: 0

Hi,

I am trying to do a search via button click and I tried below code:

http://jsfiddle.net/kmd1970/yLxowxen/

It works great but it do not reset the result after initial search:
1. I entered "Software Engineer" in "Position" field and click on search, it shows proper result.
2. Then I make "Position" field as blank and again click on search, now result is not refreshing.

Please let me know how to fix this issue.

Thank you.

Answers

  • allanallan Posts: 63,892Questions: 1Answers: 10,530 Site admin

    You have:

    if(this.value.length){
    

    So you are explicitly telling it not to reset the filter!

    Remove that line :)

    Allan

This discussion has been closed.