I have this jquery :
var btn_ongkir_result = $('#ongkir-result').attr('href');
//-- this produce : http://example.com?dest=2313
var current_dest = btn_ongkir_result.param('dest');
//-- I'm expecting 2313 here. but it gives me error on console
//-- btn_ongkir_result.param is not a function
how to get dest parameter from btn_ongkir_result variable? thank you
var url_parts = btn_ongkir_result.split('dest=');? Then, refer to the resulting array, at index 1, this should have isolated the parameter value. I hope this helps !