alert(event.type)

See

http://docs.jquery.com/Events_(Guide)#event.type

for more info.

- Richard

On Wed, Jan 7, 2009 at 5:46 PM, bob <xoxeo...@gmail.com> wrote:

>
>        var handler = function(e){
>
>                //How do I know what event triggered this function?
>                //this does not work:
>                alert('e = ' + e);
>
>                if(e=="focus")  alert("focus");
>                else if(e=="blur")      alert("blur");
>        }
>
>
> jq('inp...@name=city]').bind("focus", handler);
> jq('inp...@name=city]').bind("blur",  handler);

Reply via email to