  The aim of this work is to prove a compact embedding for a weighted
fractional Sobolev spaces. As an application, we use this embedding to prove,
via variational methods, the existence of solutions for the following
Schr\"odinger equation $$
  (-\Delta)^su + V(|x|)u = K(|x|)f(u), \quad \text{ in } \mathbb{R}^N, $$ where
the two measurable functions $K > 0$ and $V \geq 0$ could vanish at infinity.
