Reputation: 461
I got a bit of a pickle.
What im trying to do is click on a link and it automatically puts a value into an input field.
I have an quicksearch table that auto sorts when you type something in the search box. I want to be able to click a link with a specific name that automatically puts that value in the search field.
So far i have this
$(document).ready(function() {
$('#test').click(function() {
$('.qs_input').val( $(this).text() ).keyup();
return false;
});
});
Cheers,
Upvotes: 0
Views: 4433
Reputation: 185893
This should do it:
$('#yourLink').click(function() {
$('#yourInput').val( $(this).text() ).keyup();
return false;
});
Upvotes: 3