<div id="element1" onclick="func();">1</div>
<div id="element2" onclick="func();">2</div>
<div id="element3" onclick="func();">3</div>
<div id="element4" onclick="func();">4</div>
<div id="element5" onclick="func();">5</div>
<div id="element6" onclick="func();">6</div>
<div id="element7" onclick="func();">7</div>
<div id="element8" onclick="func();">8</div>
When user click any div, func() function will work and a counter calculate how many times process func() function. For example 2 times (we determine the number) process func() function than when user click any div again function will not work. How can I do this with jquery?