how to pass variable to $('xxx'').click(function () {

how to pass variable to $('xxx'').click(function () {

I'm trying to pass a variable to  .click function

I have defined a var navFlag="home"

  1. $('.nav').click(function (navFlag) {

        alert("nav under construction - navFlag .. "+navFlag);

    }); // nav

navFlag is returned as [object Object]

What is the proper way to do this?


Thanks for any help,

R