How to display a panel if you click on a sprite?

Im trying to turn a sprite into a button, and when I press the sprite, it will display a panel.
Need help

Put a collider on the GameObject with the sprite and a script. In the script use OnMouseDown to display the panel.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    void OnMouseDown()
    {
        // Enable the panel here
    }
}