input - How do I add a string value of an href using jquery? -


i have input button has href. need add string after last / in href input text box. how can accomplish using jquery? here code:

//this search button $('#switch-fighter-search-button-link').attr("href","/fighters/search/");  //this input box var sft = $('$switch-fighter-text').val(); 

$('#switch-fighter-search-button-link').attr("href","/fighters/search/" + $('$switch-fighter-text').val()); 

Comments

Popular posts from this blog

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -

Python __call__ special method practical example -