jQuery for the selection mechanism working