I'm trying to hide element when the checkbox is clicked.
Somehow it didn't work -
html
<input type="checkbox" onchange="showAtidit()">
<p id="hidethis">
hide me
</p>
js
function showAtidit($)
{
if ($(this).is(':checked'))
{
alert("not hide");
document.getElementById( "hidethis" ).style.display = 'block';
}
else
{
alert("hide");
document.getElementById( "hidethis" ).style.display = 'none';
}
};
http://jsfiddle.net/wv97mpcp/108/
What's wrong?
Thanks!
showAtidit($)