I have a button that has its location generated dynamically via jquery:
<a id="final_location"
href="/pre_config/step4"
class="proceed-btn right">Proceed To Next Step >>></a>
$('#final_location').click(function() {
location.href = this.href + '/' + escape($('#type_of_station').html()) +
'/' + escape($('.number_changer').attr("id").slice(-1));
return false;
});
this works great but the problem comes into play when the html in type_of_station is two words... I get this url:
pre_config/step4/Pizza Delivery/2
Is there a way to make the url only give me the first word like this:
pre_config/step4/Pizza/2
maybe this can be changed to only return the first word?