ajax working when function is on child theme but not in plugin page

And i found the answer. As Jacob Peattie asked the instance of the class was defined but was not called. Although the class file was included , instance was not called. Thank you everyone for your valuable time.