JS file of rook and knight movement

using id of a particular div and images and logic of rook is built in
this javascript.