Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I trigger a filter programatically with jquery like $("#filterid").val("bla").change() ? #154

Open
raguchi opened this issue Apr 20, 2017 · 1 comment

Comments

@raguchi
Copy link

raguchi commented Apr 20, 2017

I'm trying to change a filter values programatically with jquery with $("#filterid").val("new value").change() but it's not working, FJS doesn't realise about the new value, only interacting directly with the filter provoques filtering.

It works in auto demo (try in console with $("#searchbox").val("the go").change(); ), but my code is the normal version, no auto.

How can I achieve this?
thanks!

@jiren
Copy link
Member

jiren commented Apr 21, 2017

$("#filterid").trigger('change') will work. It also depend upon events: change, click etc

i.e
$('#runtime_filter').val('50-100').trigger('change')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants