Replaced ajax for categorization with jquery