You can make this kind of button knot technique as a necklace/bracelet closer by putting in a fastener before tying the knot. If so, you have to do this on both ends of the cord. It can be used as a sliding knot itself or you just want it to stay still.