[jQuery] element attributes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000 size=2>This
is probably a simple question, but I'm having problems finding the
answer...</FONT></SPAN></DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000 size=2>If I
have the following code...</FONT></SPAN></DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2> <div id="test">hi
world</test></FONT></SPAN></DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000 size=2>and
want to assign my own attribute to it...</FONT></SPAN></DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2> $("#test").set("world","earth")</FONT></SPAN></DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000 size=2>I
can set it fine, but I can't seem to get it after it has been set. I've looked
for a function to do this in jquery, but can't seem to find one. I also
tried...</FONT></SPAN></DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2> alert (<SPAN class=250391916-13032006><FONT
face=Georgia color=#008000
size=2>$("#test").world);</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2><SPAN class=250391916-13032006></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2><SPAN class=250391916-13032006>But this doesn't seem to work either.
However, if I do the following it works fine:</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2><SPAN class=250391916-13032006></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2><SPAN class=250391916-13032006>
alert(document.getElementById("test").world);</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2><SPAN class=250391916-13032006></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2><SPAN class=250391916-13032006>Can anyone help
please?</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2><SPAN class=250391916-13032006></SPAN></FONT></SPAN> </DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2><SPAN class=250391916-13032006>Thanks</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000
size=2></FONT></SPAN> </DIV>
<DIV> </DIV>
<DIV align=left><FONT face=Arial size=1>Craig Kohtz | Director of Information
Systems<BR><FONT
color=#808080>+++++++++++++++++++++++++++++++++++++++</FONT><BR>Archrival |
Youth Brand Strategy + Design<BR><FONT
color=#808000>/////////////////////////////////////////////////////////////////////////////</FONT><BR><FONT
color=#008000>Archrival.com | 402 435 2525 | Lincoln Nebraska</FONT><BR><FONT
color=#00ff00>/////////////////////////////////////////////////////////////////////////////</FONT><BR><FONT
color=#008000>\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\</FONT><BR></DIV></FONT>
<DIV> </DIV></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/