In this paper, we propose an approximate method for solving a general class of pantograph differential equations. The proposed method is based on a combination of least squares, epsilon and Ritz methods. The convergence properties of the method are analyzed and discussed. Finally, several numerical examples are given to illustrate the applicability and efficiency of the method.