Re: [Proto-Scripty] Prototype's selector as well as "eq" in Jquery
Prototype does all the "CSS" stuff internally, and returns the correct element from the DOM. The browser doesn't have to do any heavy thinking. Walter On Sep 25, 2012, at 12:50 PM, Jason Westbrook wrote: > > nth-child doesnt work in Internet Explorer CSS - can Prototype correctly > decode that in IE? > > Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com > > > > On Mon, Sep 24, 2012 at 9:55 AM, Victor wrote: > $("#table-id td:nth-child(2)") > will select 2nd cells in all rows of table with id "table-id" > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/prototype-scriptaculous/-/1lO-8ck8qY4J. > > To post to this group, send email to prototype-scriptaculous@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To post to this group, send email to prototype-scriptaculous@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Prototype's selector as well as "eq" in Jquery
You could probably also use $$('td .yui-dt-liner div[id^=yui-gen]')[2].setStyle('width:122px'); for individual calls - but if you are going through multiple elements I would use each as Walter described Jason Westbrook | T: 313-799-3770 | jwestbr...@gmail.com On Sun, Sep 23, 2012 at 3:19 PM, Walter Lee Davis wrote: > Sure. if you start at the tr that holds the tds, you can use down() to do > this. If you want the second td to have a certain width, you could do this: > > $$('tr').each(function(elm){ > elm.down('td', 2).setStyle('width:122px'); > }); > > Walter > > On Sep 23, 2012, at 12:59 PM, Евгений Шморгун wrote: > > > I have to assign the different sizes to the td, and the width of them > depends on the number's position of the tag in table. > > > > In Jquery I can write > > > > $$('td .yui-dt-liner > div[id^=yui-gen]').eq(2).invoke("setStyle",{'width':'122px'}); > > changing the argument in eq. is there analogue expression in > prototype.js ? > > > > Thanks! > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "Prototype & script.aculo.us" group. > > To view this discussion on the web visit > https://groups.google.com/d/msg/prototype-scriptaculous/-/rjXTGT4Eu94J. > > To post to this group, send email to > prototype-scriptaculous@googlegroups.com. > > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscr...@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To post to this group, send email to > prototype-scriptaculous@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Prototype's selector as well as "eq" in Jquery
Sure. if you start at the tr that holds the tds, you can use down() to do this. If you want the second td to have a certain width, you could do this: $$('tr').each(function(elm){ elm.down('td', 2).setStyle('width:122px'); }); Walter On Sep 23, 2012, at 12:59 PM, Евгений Шморгун wrote: > I have to assign the different sizes to the td, and the width of them depends > on the number's position of the tag in table. > > In Jquery I can write > > $$('td .yui-dt-liner > div[id^=yui-gen]').eq(2).invoke("setStyle",{'width':'122px'}); > changing the argument in eq. is there analogue expression in prototype.js ? > > Thanks! > > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/prototype-scriptaculous/-/rjXTGT4Eu94J. > To post to this group, send email to prototype-scriptaculous@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Prototype's selector as well as "eq" in Jquery
I have to assign the different sizes to the td, and the width of them depends on the number's position of the tag in table. In Jquery I can write $$('td .yui-dt-liner div[id^=yui-gen]').eq(2).invoke("setStyle",{'width':'122px'}); changing the argument in eq. is there analogue expression in prototype.js ? Thanks! -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/rjXTGT4Eu94J. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.