On May 15, 4:02 pm, "Justin Perkins" <[EMAIL PROTECTED]> wrote:
> On Thu, May 15, 2008 at 12:22 AM, RobG <[EMAIL PROTECTED]> wrote:
> > It is not a good idea to use custom attributes on HTML elements, the
> > class attribute can provide similar functionality.
>
> With all do respect, why? I have been using custom attributes for a
> very long time and have never seen one single negative side effect.
User agents should ignore unrecognised attributes, but as the OP
discovered, their use can create problems in other ways. In this
case, the addition of certain attribute names has interfered with
scripts, but they could just as easily cause problems by being
recognised by a particular browser as something other than what was
intended. IE in particular has a heap of custom attributes.
The possibility of issues can be mitigated using a pseudo-namespace
(e.g. adding a prefix to all such attributes), however it can be
reduced to zero by using standard attributes such as class.
--
Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---