We present essential properties of the generalized Jacobi functions (GJFs) and their application to construct efficient and accurate spectral methods (SM) for a class of fractional differential equations (FDEs). In particular, it is shown that GJFs allow us to effortlessly compute the stiffness matrices, and resolve the leading singular term for a general class of FDEs.