I have a input button that has an href. I need to add a string after the last / in the href from an input text box. How can this get accomplish using jquery? Here is the code:
//This is the Search Button
$('#switch-fighter-search-button-link').attr("href","/fighters/search/");
//This is the Input box
var sft = $('$switch-fighter-text').val();
$('#switch-fighter-search-button-link').attr("href","/fighters/search/" + $('$switch-fighter-text').val());