WordPress has its own version of the jQuery library and using $ operator will end up with js errors in your…