We consider theoretically liquid rise against gravity in capillaries with height-dependent cross-sections. For a conical capillary made from a hydrophobic surface and dipped in a liquid reservoir, the equilibrium liquid height depends on the cone-opening angle alpha, the Young-Dupré contact angle theta, the cone radius at the reservoir's level R(0), and the capillary length kappa(-)(1). As alpha is increased from zero, the meniscus' position changes continuously until, when alpha attains a critical value, the meniscus jumps to the bottom of the capillary. For hydrophilic surfaces the meniscus jumps to the top. The same liquid height discontinuity can be achieved with electrowetting with no mechanical motion. Essentially the same behavior is found for two tilted surfaces. We further consider capillaries with periodic radius modulations and find that there are few competing minima for the meniscus location. A transition from one to another can be performed by the use of electrowetting. Finite pressure difference between the two sides of the liquids can be incorporated as well, resulting in complicated phase-diagrams in the alpha-theta plane. The phenomenon discussed here may find uses in microfluidic applications requiring the transport small amounts of water "quanta" (volume < 1 nL) in a regular fashion.