Function to change clicktype