[jQuery] A gotcha with attr(key,value)
If a form has a child element (eg a select) whose 'name' attribute is
'action' then the line:
$("form").attr("action","newaction.php") fails silently. Line 1070 of
jquery.js (1.2.6) is
elem[name]=value which equates to elem['action']='newaction.php'. But
the value
of elem[name] is the child element, not the action attribute. (I have
an example)
It is easily avoided but I thought it worth bringing up - and is there
anywhere that I could post
this and the example so people could find it? I am fairly new to
jquery - which
I'm preferring to prototype now.
Peter