I found a bug and updated the file at http://digitalbush.com/files/jquery/findnext/jquery.findnext.js
It seems like it's doing what I need it to do now. Josh On Jul 25, 4:49 pm, Josh Bush <[EMAIL PROTECTED]> wrote: > I think I'll be doing a final 1.0 release of masked input. Thanks for > keeping me on my toes. > > I kind of need mine to be very flexible, so I came up with > this:http://digitalbush.com/files/jquery/findnext/jquery.findnext.js > > All you do is "$('something').findNext(optional selector);" > > It's totally just fresh off my head. It recurses children of the > current object, then tries the siblings and their children, then it > walks up the parent chain trying to find something. In my stupid test > scenario it appears to work. I'd love for some feedback on the above > method. I'm sure it could use some optimization and refactoring. > > Here's my test HTML: > <table> > <tr><td><input id="num1" type="text" /></td><td><input id="num2" > type="text" /></td></tr> > <tr><td><input id="num3" type="text" /></td></tr> > </table> > <input id="num4" type="text" /> > > Here's my test JS: > alert($("#num1").findNext("input").attr("id")); > alert($("#num2").findNext().attr("id")); > alert($("#num3").findNext().attr("id")); > > In FF2 and IE7 I get my expected values of: > num2 > num3 > num4 > > -Josh > > On Jul 25, 3:15 pm, Eric C <[EMAIL PROTECTED]> wrote: > > > Josh: > > > I had a similar issue, in fact using your very own maskedInput > > plugin. I wanted the :completed callback to tabOver to the next > > input, regardless of the location. I posted the code that works for > > me on this > > thread:http://groups.google.com/group/jquery-en/browse_thread/thread/d9f5267... > > > Any chance of a release on maskedInput soon? > > > On Jul 25, 3:02 pm, Josh Bush <[EMAIL PROTECTED]> wrote: > > > > .next() grabs the very next sibling. I need to be able to grab the > > > very next occurrence of an object if it's a sibling, cousin (parent's > > > next sibling's child), uncle/aunt(parent's next sibling), nephew/ > > > niece(sibling's child), or whatever. If memory serves, .next() used > > > to have this behavior even if it might not have been intended. Does > > > anyone have a good way to execute this type of behavior? > > > > I'm guessing you would need to walk all siblings and their children > > > recursively. If that failed, you would need to find your parents > > > sibling and continue the process. > > > > Thanks in advance for any feedback. > > > > Josh