You can simply add the following jquery code to perform ajax using codeigniter