Brandon Aaron wrote an entry on DOM Expandos (custom attributes) a while back: http://www.learningjquery.com/2007/03/selecting-elements-by- properties-and-dom-expandos

The examples use the XPath syntax, so in jQuery 1.2, you'll need to either add the XPath plugin or remove the "@" symbol.


--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Sep 19, 2007, at 10:54 AM, Glen Lipka wrote:

I do that sort of thing all the time. The validation not working bugs me, but I learn to live with it.
Glen

On 9/19/07, Benjamin Sterling <[EMAIL PROTECTED]> wrote:
Aljosa,
You can get away with doing that, not exactly sure if it will validate, but you can do what you are doing.


On 9/19/07, Aljosa Mohorovic < [EMAIL PROTECTED]> wrote:

if i have <a href="#" class="test" arg1="10" arg2="100">test</a>

$("a.test").click(function() {
  arg1 = $(this).attr('arg1');
  arg2 = $(this).attr('arg2');
  // code using args
});

is this acceptable way of using attr or should i avoid this?




--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


Reply via email to