you could always use the metadata plugin, and then have something like
this (which validates):
<a href="#" class="test {arg1: 100, arg2: 100}">test</a>
you can find the metadata plugin on the jquery plugins page:
http://docs.jquery.com/Plugins
dennis.
Benjamin Sterling 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]
<mailto:[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