Damn it!  I stand corrected.  Thanks Jules!   And it worked as I
thought it should have.  Even though this is only my 2nd jQuery
project I KNOW for a fact(mostly) that I used the proper syntax and
method of trying to retrieve my custom attrib.  I have a sneaky
feeling that I was a victim of browser cache.  There have been a few
times I have setup something that should work, but doesn't, so I
replace my code with a work-around, and then if I go back to my
original setup it magically works.  I hate when I try to help people
with the wrong information.

On Aug 4, 11:21 pm, Jules <jwira...@gmail.com> wrote:
> jQuerysupportcustomattributes, may be you can post a sample?
>
> Anyway, this works
>
> $(document).ready(function(){
>    alert($("[custom='test']").length);
>
> });
>
> <input type="text" id="text1" name="text1"custom="test" />
> <input type="text" id="text2" name="text2"custom="test" />
> <input type="text" id="text3" name="text3"custom="test" />
> <input type="text" id="text4" name="text4"custom="test" />
>
> On Aug 5, 10:04 am, Miket3 <miketro...@gmail.com> wrote:
>
> > One issue I ran across while learningjquerywas that I often wanted/
> > needed a way to telljqueryto get data for the current element from a
> > related element.jQueryimmediately tends to be friendly when you need
> > to work with a class of elements via the CLASS attribute, or a
> > specific element via the ID attribute. However, when there are 2
> > elements that are related but do not fit within a class, a beginner
> > such as myself may have a little trouble trying to find the best way
> > to handle this issue. At this point we begin to research how to get
> >jQueryto recognize acustomattribute, because common rules says that
> > the ID attrib is basically out of the question as this needs to be
> > unique to each element. And the CLASS attrib just doesn't logically
> > help either because it can refer to too many other elements that don't
> > fit our rule. And when we find out thatjQuerydoesn't readily
> > recognizecustomattributesit can get a little intimidating because
> > one of the solutions is to extendjQuery.  But there are a couple of
> > other standardattributesthat are recognized but rarely used.  In my
> > particular case I started using the TITLE attribute for relating my
> > elements. But then I stumbled upon the correct way, (or at least until
> > someone corrects me on this post).  There is a REL attribute which can
> > be used to RELATE the to elements.  So when you feel like you need a
> >customattribute, you might not need one, the REL is available and the
> > TITLE could be used as a backup if necessary.
>
> > I hope this helps someone.

Reply via email to