The button doesn't have an id of test, the span you wrapped it in does. You need to target the button element itself:
@@#test;<<button "test">>
<<run $("#test button").prop("disabled", true)>>
<</button>>@@
You can use jQuery, it's included in SugarCube.