@Ryan

This pseudo-class would be an awesome addition!

--
Fábio Miranda Costa
front...@portalpadroes
Globo.com
*github:* fabiomcosta
*twitter:* @fabiomiranda
*ramal:* 6410



On Fri, Oct 22, 2010 at 5:30 PM, Gafa <[email protected]> wrote:

> Totally agree. Slick, is Slick, once you get your arms wrapped around
> it.
>
> Agree about "children-number", should have been more clear with the
> name, copy and paste, that'll get yah.
>
>
> On Oct 22, 2:56 pm, Ryan Florence <[email protected]> wrote:
> > Nice work.  Slick, is ... slick.
> >
> > If I were looking at your code and saw 'children-number' I'd scratch my
> head wondering what on earth that was returning.  What about this?
> >
> > :has-n-children(n)
> > :has-n-children(<n)
> > :has-n-children(<=n)
> > :has-n-children(>n)
> > :has-n-children(>=n)
> >
> > On Oct 22, 2010, at 12:52 PM, Gafa wrote:
> >
> > > Cheers all!
> >
> > > Code snip-it for anyone in future who needs to get all TD from a Table
> > > Row based on number of TD columns:
> >
> > > Slick.definePseudo('children-number', function (n) {
> > >            if (this.children.length < n) //modify logic as needed
> > >                return this.children;
> > > );
> >
> > > $$("#tblReportView tr:children-number(" + iColumns +
> > > ")").each(function (item, index) {
> >
> > >            if (item.rowIndex.toInt() == 0) //ignore 1st row in my
> > > case header row
> > >            {
> > >                return;
> > >            }
> > >            else{
> > >                item.cells[(item.cells.length - 1)].set('colspan',
> > > iColumns);
> > >            }
> > > });
> >
> > > On Oct 22, 2:14 pm, אריה גלזר <[email protected]> wrote:
> > >> Sp, from Fabio's example:http://www.jsfiddle.net/ariehg/SNpzs/
> >
> > >> On Fri, Oct 22, 2010 at 6:57 PM, Oskar Krawczyk <
> [email protected]>wrote:
> >
> > >>> That's S(l)ick!
> >
> > >>> O.
> >
> > >>> On 2010-10-22, at 18:49, Ryan Florence wrote:
> >
> > >>> Tangental, I know, but Oskar's example could be done completely with
> Slick
> > >>> :D
> >
> > >>>http://www.jsfiddle.net/QhCtB/1/
> >
> > >>> Reverse combinators FTW!
> >
> > >>> On Oct 22, 2010, at 10:17 AM, Oskar Krawczyk wrote:
> >
> > >>> Why not doing it this way:http://www.jsfiddle.net/oskar/QhCtB/
> >
> > >>> <http://www.jsfiddle.net/oskar/QhCtB/>O.
> >
> > >>> On 2010-10-22, at 18:03, Gafa wrote:
> >
> > >>> Fábio,
> >
> > >>> Initially does it work?, if not, then asking for it to be included
> > >>> some point in time.
> >
> > >>> thanks
> >
> > >>> Gafa
> >
> > >>> On Oct 22, 11:59 am, Fábio M. Costa <[email protected]>
> > >>> wrote:
> >
> > >>> Are you requiring this feature or asking if it works?
> >
> > >>> --
> >
> > >>> Fábio Miranda Costa
> >
> > >>> front...@portalpadroes
> >
> > >>> Globo.com
> >
> > >>> *github:* fabiomcosta
> >
> > >>> *twitter:* @fabiomiranda
> >
> > >>> *ramal:* 6410
> >
> > >>> On Fri, Oct 22, 2010 at 1:10 PM, Gafa <[email protected]>
> wrote:
> >
> > >>> Retrun (array) all TR (rows) in a table that have childNodes < a
> >
> > >>> number.
> >
> > >>> Example:
> >
> > >>> Slick.search($('tblSomeTable'), 'tr[childNodes.count<4]');
> >
> > >>> thanks
> >
> > >>> Gafa
> >
> > >> --
> > >> Arieh Glazer
> > >> אריה גלזר
> > >> 052-5348-561
> > >> 5561
>

Reply via email to