Add some functions

Added delete function
Added ajax for deleting post element