use MouseOnClick two times?

Hey guys!
I found this script called “DisplayUI”.
I want that it shows the information whenever I click on an object - when I click on it again it should disappear. Here’s the code (c#):
using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class displayUI : MonoBehaviour {

    public string myString;
    public Text myText;
    public float fadeTime;
    public bool displayInfo;
    public float lifeSpan = 5;

    // Use this for initialization
    void Start() {

        myText = GameObject.Find("Text").GetComponent<Text>();
        myText.color = Color.clear;
        //Screen.showCursor = false;
        //Screen.lockCursor = true;
    }

    // Update is called once per frame
    void Update()
    {

        FadeText();

        /*if (Input.GetKeyDown (KeyCode.Escape))
            
               {
                        Screen.lookCursor = false;

               {
               */


    }

    void OnMouseEnter()
    {
        displayInfo = true;
        lifeSpan = 2;

    }



    void OnMouseExit()

    {
        displayInfo = false;
        lifeSpan = 2;

    }


    void FadeText()

    {


        if (displayInfo)
        {

            myText.text = myString;
            myText.color = Color.Lerp(myText.color, Color.white, fadeTime * Time.deltaTime);
            lifeSpan = 2;
        }

        else
        {

            myText.color = Color.Lerp(myText.color, Color.clear, fadeTime * Time.deltaTime);
            lifeSpan = 2;
        }




    }



}

How could I do this?

bool doTheThing=false;
void Update()
{
if(Input.GetMouseButtonDown(0))
doTheThing = !doTheThing;

if(doTheThing) YourUIpanel.SetActive(true);
Else YourUIpanel.SetActive(false);
}