UPDATED
DEMO: http://jsbin.com/uneti3/3
your code is wrong, it should be something like this:
$(bla).click(function() {
var disable = $target.toggleClass('open').hasClass('open');
$target.prev().prop("disabled", disable);
});
you are using the toggleClass function in wrong way