Re: [jQuery] How to find some consequent elements

2007-03-04 Thread Brice Burgess
Dmitry Rudakov wrote:
 For example, I have:
 div id=start.../divinput id=id1/input id=id2/input
 id=idN/div/divinput id=out/

 I need to find all inputs (from 1 to N) and not to find input with id=out

 if I use $(#start).siblings(input) I will find all inputs including
 input with id=out
Dmitry,

  As an example, you can use

   var elements = $('input',$('#start')).not('#out');

  I am sure others will have other suggestions.

~ Brice



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to find some consequent elements

2007-03-04 Thread Dmitry Rudakov



Brice Burgess wrote:
 
 Dmitry,
 
   As an example, you can use
 
var elements = $('input',$('#start')).not('#out');
 
   I am sure others will have other suggestions.
 
Bruce, I do not know ID or something else about these wrong inputs ...
#out was just for example

I should break this sequence only when I meet any other element NOT
input... that's why I cannot use filter() or not()

I find a solution but it doesn't look a simple and elegant...

$('input',$('#start')).filter( function(index) {return
$(this).prev().is(input) || $(this).next().is(input);});

that's why I ask for some help... 

thanks,
Dmitry

-- 
View this message in context: 
http://www.nabble.com/How-to-find-some-consequent-elements-tf3344703.html#a9303000
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/