Suppose your writing desk is tilted a little a book kept on it starts sliding down. What will be the direction of frictional force acting on it?
Direction of frictional force
Hence, the direction of the frictional force is opposite to the direction of the motion of the book.