Reputation: 49
I have a table which i have made searchable from a JavaScript. I have set the input valute to Stavanger, but when the page load i need to go to the input field and push enter on my keyboard to execute it.
How can the Stavanger value automaticly be executed when loading the page?
Here are an example to see my problem: https://fiddle.jshell.net/Lpn98e8f/
Regards
Upvotes: 1
Views: 35
Reputation: 5466
You may trigger keyup
event using jQuery's trigger function:
Example:
$("#search").trigger("keyup")
Updated fiddle
Upvotes: 1