[jQuery] Re: Passing variables to .click

2009-08-26 Thread Richard D. Worth
Another option would be to use the metadata plugin: http://plugins.jquery.com/project/metadata - Richard On Tue, Aug 25, 2009 at 7:59 AM, AMP ampel...@gmail.com wrote: Good one, Thanks On Aug 24, 4:02 pm, James james.gp@gmail.com wrote: Since region is not a valid HTML attribute,

[jQuery] Re: Passing variables to .click

2009-08-25 Thread AMP
Good one, Thanks On Aug 24, 4:02 pm, James james.gp@gmail.com wrote: Since region is not a valid HTML attribute, other ways is to set an ID on the element and use that as a reference to data stored elsewhere (e.g. a Javascript array or object). Depending on whether you have a lot of data

[jQuery] Re: Passing variables to .click

2009-08-24 Thread James
Since region is not a valid HTML attribute, other ways is to set an ID on the element and use that as a reference to data stored elsewhere (e.g. a Javascript array or object). Depending on whether you have a lot of data or not. Assuming you have many onclicks on your page, here's another way to

[jQuery] Re: Passing variables to .click

2009-08-23 Thread MorningZ
MANY ways to do this, with this being one of them button id=parsetablebutton region=?php echo $Region ?Some Text/button then $(#parsetablebutton).click(function() { var region = $(this).attr(region); //-- the value from PHP }); again, that's just one way of many On Aug 23, 6:04 

[jQuery] Re: Passing variables to .click

2009-08-23 Thread AMP
This is the way I was thinking so could you give me another example without attributes (Just so I could learn a different way). Thnaks On Aug 23, 8:05 pm, MorningZ morni...@gmail.com wrote: MANY ways to do this, with this being one of them button id=parsetablebutton region=?php echo $Region