You need to use the ID selector (#):
$('#btnInput').click(showVal);
$('#btnInput').bind('click', showVal);

- Richard

On Wed, Aug 26, 2009 at 2:18 AM, S2 <smnthsm...@gmail.com> wrote:

>
> I have this code that works:
>
> var btnInput= document.getElementById('btnInput');
> btnInput.addEventListener("click", showVal, true);
>
> Why doesn't this work?
>
> $('btnInput').click(showVal);
> $('btnInput').bind('click', showVal);

Reply via email to