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

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -