How to Call ajax in Codeigniter

Getting data through Ajax is very cool, and when we can reuse the CodeIgniter views to get the Ajax data, the overall user experience become much more enhanced. So, in this tutorial I would show you how to call Ajax in controller.

This is a tutorial where I am not going to talk about how to get the Ajax data just how to call Ajax in controller.