Put the cucumber slices and onions in a large bowl in layers.
Sprinkle with the salt, cover and leave for 2 hours, turning once
Rinse under cold running water and pat dry with a clean tea towel or kitchen paper.
Meanwhile, make the pickling liquid; put all the ingredients in a pan and warm over a low heat for 3-4 minutes until the sugar dissolves.
Pack the cucumber slices in the cold and sterilised jars and pour the vinegar to cover the cucumber and onions
Tap the jars to remove any air pockets and seal
Leave the jars in a cool, dark place for 1 week to mature