The Jacobi polynomial collocation method is extended to two and three dimensions by superimposing the individual one-dimensional expansions. Two innovative ideas are introduced in this article.The first is the cornerless/edgeless computational grid, and the second is the modified compressibility method, which is an iterative pressure solver. To evaluate the new method's applicability in solving the Navier-Stokes equation, the lid-driven cavity flow problem was solved. Two configurations were considered, the square cavity and the rectangular cavity with an aspect ratio of 2. A comparison of the center-line velocity profiles from two-and three-dimensional simulations at a Reynolds number of 1000 is provided for each of the configurations. The center-line velocity comparisons showed good quantitative agreement with previous studies.