[jQuery] Re: next release?

2010-01-06 Thread MorningZ
A post from just 2 days ago :-) http://groups.google.com/group/jquery-en/browse_thread/thread/a9fcfc8e8deb0106?hl=en# On Jan 6, 12:47 pm, johnantoni wrote: > hi, any idea when the next version of jQuery is to be released?

Re: [jQuery] Re: next()

2009-12-04 Thread Michel Belleville
Well it would work if a bit complicated and probably a pain to maintain. If there wouldn't be any other select named like your second select, I'd rather select it by its name if I were you. Or perhaps give these specific select a common ancestor and select it using this common ancestor as reference

[jQuery] Re: next()

2009-12-04 Thread TMNT
Michel, thanks for your response. So, do I need to get the parent of my country element (which would be the div ) & get all it's siblings and then look for elements with class 'state' or is there a simpler way? On Dec 4, 12:47 am, Michel Belleville wrote: > That's easy, .next() finds the nearer

Re: [jQuery] Re: next()

2009-12-04 Thread Michel Belleville
That's easy, .next() finds the nearer next *sibling* of current element matching the selector. In your case, your element is not current element's sibling, it's under another node altogether. hey, it's me !! and I'm his sibling and I am too though I am not because I'm not the direct child of the

[jQuery] Re: next()

2009-12-03 Thread TMNT
Thank you jpcozart. here's part of my html: Country of ED Submitter *: -- Select country --CanadaKazakhstanRussian FederationSingaporeSloveniaSouth AfricaUnited States State or Region of ED Submitter *: -- Select one --AlbertaBritish ColumbiaManitobaNew BrunswickNewfoundland and LabradorN

[jQuery] Re: next()

2009-12-03 Thread jpcozart
I would have to see the structure of the document to know where the problem lies. It seems as though country.next("select.state"); is not returning the node you are looking for. On Dec 3, 1:07 pm, TMNT wrote: > Matt, thanks for your response. > > I had originally posted this on jquery-dev gr

[jQuery] Re: next index in Jquery

2009-07-03 Thread Mauricio (Maujor) Samy Silva
>...selecting the next .slide after the one with .current in it? $('.current').next('.slide') -- > how can i get the div index of the .current class? var divIndex = $('#slideshow div').index( $('.current') ); Maurício

[jQuery] Re: next / siblings issue

2009-03-29 Thread Dunc
Urgh. Thanks very much for your help, I've found the issue. I didn't think of changing my testing methodology; it would seem that a number of things I'd tried would have worked. The confusion (and I clear this up only for the other people who read this who have the same problem as me) was that

[jQuery] Re: next / siblings issue

2009-03-29 Thread mkmanning
Given this html: Category* Skill or Service --Other This JavaScript will cause the second select to show when the first one is changed: $(document).ready(function(){ $('#ctl00_cphMain_repSkills_ct

[jQuery] Re: next / siblings issue

2009-03-29 Thread Dunc
Nope, it would seem I'm failing jQuery101. I've tried: var ddlSource = this.id; // this works perfectly alert(ddlSource); var ddlTarget = $(this).nextAll('select'); alert('target1: ' + ddlTarget.id); ddlTarget = $(ddlSource).nextAll('select'); alert('target2: ' + ddlTarget.id); ddlTarget = $

[jQuery] Re: next / siblings issue

2009-03-29 Thread mkmanning
Adding the expr just filters the matched elements further. Try .nextAll ('select'). On Mar 29, 2:42 am, Dunc wrote: > I'm building cascading selects, but because they could come from > mulitple locations within the HTML, I need to capture the ID of the > parent select (easy enough) and the child

[jQuery] Re: next and previous links with thumbs on mouseover

2009-03-29 Thread Victor Nogueira
Hi Mike, Can you please help me making a list of thumbs without links, that have a class to the thumb for next image and prev image? I just wanted to identify next/prev thumbs dinamically (with classes), so I can hide the others and display next/prev on mouseover. Thank you a lot for the answer.

[jQuery] Re: next and previous links with thumbs on mouseover

2009-03-28 Thread Mike Alsup
> Want to know if it's possible to show thumbs attached prev/next > anchors when I put the mouse over these navigation links. It would > work like a preview tooltip for next/prev images. That's not something that the Cycle plugin will do for you. However, you could probably use the before/after

[jQuery] Re: next and previous links with thumbs on mouseover

2009-03-28 Thread Victor Nogueira
Forgot to mention I was talking about jquery cycle. sorry. ;/ On Mar 27, 11:18 pm, Victor Nogueira wrote: > Hi there, > > Want to know if it's possible to show thumbs attached prev/next > anchors when I put the mouse over these navigation links. It would > work like a preview tooltip for next/pr

[jQuery] Re: next() question

2009-03-04 Thread Alexandre Plennevaux
whole parent().next().children('a.tab- > menu-item') stuff is faster, despite being verbose. > > cheers, > - ricardo > > > On Mar 4, 1:01 pm, Joseph Le Brech wrote: >> http://docs.jquery.com/DOM/Traversing/Selectors#Not_supported >> >> i seen the +

[jQuery] Re: next() question

2009-03-04 Thread Alexandre Plennevaux
wow, clever, that does the trick ! $('ul.tab-menu a.tab-menu-item-selected').parent().next().children('a.tab-menu-item').trigger('click.simplyTabs'); On Wed, Mar 4, 2009 at 4:58 PM, mkmanning wrote: > > next() finds the the unique next siblings for that element (in this > case their are none

[jQuery] Re: next() question

2009-03-04 Thread ricardobeat
ersing/Selectors#Not_supported > > i seen the + operator seems to do something similar, it means an element > preceding. > > Date: Wed, 4 Mar 2009 16:54:46 +0100 > Subject: [jQuery] Re: next() question > From: aplennev...@gmail.com > To: jquery-en@googlegroups

[jQuery] Re: next() question

2009-03-04 Thread Joseph Le Brech
http://docs.jquery.com/DOM/Traversing/Selectors#Not_supported i seen the + operator seems to do something similar, it means an element preceding. Date: Wed, 4 Mar 2009 16:54:46 +0100 Subject: [jQuery] Re: next() question From: aplennev...@gmail.com To: jquery-en@googlegroups.com thanks

[jQuery] Re: next() question

2009-03-04 Thread mkmanning
next() finds the the unique next siblings for that element (in this case their are none). You want the that is the child of the element's parent's next sibling, which takes longer to write in English than in jQuery :) $('a.tab-menu-item-selected').parent().next().children(); nb this assumes th

[jQuery] Re: next() question

2009-03-04 Thread Alexandre Plennevaux
thanks i got it to work, sort of. $('#tabs img.albumImage').each(function(index) { var $img = $(this).data('tabindex', index); $img.click(function() {

[jQuery] Re: next() question

2009-03-04 Thread Joseph Le Brech
you should be able to use the :after pseudo element http://www.w3.org/TR/CSS2/selector.html#before-and-after > Date: Wed, 4 Mar 2009 16:10:03 +0100 > Subject: [jQuery] next() question > From: aplennev...@gmail.com > To: jquery-en@googlegroups.com > > > Hello, > > say i have this markup:

[jQuery] Re: Next/Previous element in each loop

2009-02-09 Thread Ricardo Tomasi
You're right. And apparently it's still faster to get the element by the array index and re-wrap it in a jQuery object than to use eq(). Some room for improvement in the core there. cheers, - ricardo On Feb 9, 8:23 pm, mkmanning wrote: > And just a final note on performance, as Stephan points o

[jQuery] Re: Next/Previous element in each loop

2009-02-09 Thread mkmanning
And just a final note on performance, as Stephan points out, the for loop is faster than $.each, likewise accessing the elements by array index is quite a bit (~7x) faster than using eq() -- For 5 p elements (average time): Using .eq(): 0.14ms and 20 calls Using array index: 0.02ms 2 calls/4 ca

[jQuery] Re: Next/Previous element in each loop

2009-02-09 Thread mkmanning
Silently for text(), but it returns null for html() (using Adrian's second example/my example) so you'll most likely want to check for that. On Feb 9, 1:23 pm, Ricardo Tomasi wrote: > You can take advantage of the index passed to each. What you posted is > very close to working: > > $(function(

[jQuery] Re: Next/Previous element in each loop

2009-02-09 Thread Ricardo Tomasi
You can take advantage of the index passed to each. What you posted is very close to working: $(function() { var divs = $("div"); divs.each(function(i){ var prev = divs.eq(i-1).text(); var next = divs.eq(i+1).text(); alert(prev + " - " + next); }); }); There's no nee

[jQuery] Re: Next/Previous element in each loop

2009-02-09 Thread Stephan Veigl
Hi Adrian, as mkmanning already said, when you want to get the next / prev element from the same selector, simply access the array. In this case I prefer a for (var i=0; i: > > $("p") is an array, so you could just use the index: > > var ps = $("p"); //cache > ps.each(function(i,d) { >var

[jQuery] Re: Next/Previous element in each loop

2009-02-09 Thread mkmanning
$("p") is an array, so you could just use the index: var ps = $("p"); //cache ps.each(function(i,d) { var prevP = i>0?$(ps[i-1]):false; /* however you want to deal with there not being a prev */ var nextP = i0 && i wrote: > This explains better what I'm after: > > $("p").each(func

[jQuery] Re: Next/Previous element in each loop

2009-02-09 Thread Adrian Lynch
This explains better what I'm after: $("p").each(function(i) { var prevP = $(this).parent().prev().children("p"); var nextP = $(this).parent().next().children("p"); console.info(prevP.html()); console.info(nextP.html()); }); 1 Th

[jQuery] Re: Next/Previous element in each loop

2009-02-09 Thread Adrian Lynch
That's what I was hoping for, but next() and prev() act on the next and previous elements in the DOM, not in the nodes you're looping over. To demonstrate: $("p").each(function(i) { console.info($(this).next().html()); console.info($(this).prev().html()); });

[jQuery] Re: Next/Previous element in each loop

2009-02-04 Thread Stephan Veigl
Hi, there are prev() and next() functions doing exactly what you need: $("div").each( function() { var prev = $(this).prev(); var next = $(this).next(); alert( prev.text() + "-" + next.text() ); }); (I've skipped the extra code for the first and last element for simplicity.) by(e) Stepha

[jQuery] Re: next() working in ff but not in iex

2009-01-30 Thread Ricardo Tomasi
That's invalid mark-up, you can only have LIs as child elements of a list. The browser is creating a LI and putting those DIVs inside, that's why you're not finding them. Your code should be like this: Analysis Lorem Ipsum .. On Jan 30, 9:35 am, elduderino wrote: > H

[jQuery] Re: next closet or what

2009-01-20 Thread Ricardo Tomasi
That is absolutely completely invalid mark-up. You must have the inside the , not the opposite. It's very simple, the second input is not a sibling of the first, it's on a different TR, so next() will give you nothing. It's not "next" to the other anymore. There are three ways to overcome that:

[jQuery] Re: next() in a function

2008-11-24 Thread Leonardo K
The element is inside a . Doen'st existe any next element inside. U should do this: $(this).parent().next("p.none").toggle("slow") p.none is the next element after h3 which is the parent of a On Mon, Nov 24, 2008 at 15:14, Vinoj <[EMAIL PROTECTED]> wrote: > > I'm having some trouble with next

[jQuery] Re: next() and prev()

2008-11-11 Thread ricardobeat
Take a look at Ariel Flesler's scrollTo plug-in: http://flesler.blogspot.com/2008/09/jqueryscrollto-14-released.html On Nov 11, 12:20 pm, PaulC <[EMAIL PROTECTED]> wrote: > I'm stuck using next() and prev() > > The menu on right hand side of this site:http://sugarsnap.previewurl.net > needs to s

[jQuery] Re: .next() -- huh?

2008-10-15 Thread bnlps
sorry -- it's children() ... On 15 Okt., 23:17, bnlps <[EMAIL PROTECTED]> wrote: > hi, > > should be simple to say what's wrong ... well - > > alert() works, but alerts nothing / empty ... something like 'MOO!' or > 'BETA!' would > be great -- what's wrong with code? > > -- > > $("#na

[jQuery] Re: .next() -- huh?

2008-10-15 Thread Josh Nathanson
$("#nav div").hover(function(){alert($ (this).next('span').text());},function(){}); try this: alert($("span:first", this).text()); The span you want is actually a child of the div, while next('span') looks for a sibling span. -- Josh - Original Message - From: "bnlps" <[EMAIL P

[jQuery] Re: next() problems

2007-08-31 Thread Pops
Sean wrote: > Oh, I just tried it and actually you're right! Bummer. It worked in > the code I was using, anyway ;-) > > That behavior actually doesn't make much sense to me; it doesn't seem > like, in practive, you'd ever have immediate siblings that could be > some class (or whatever) that yo

[jQuery] Re: next() problems

2007-08-31 Thread Sean
Oh, I just tried it and actually you're right! Bummer. It worked in the code I was using, anyway ;-) That behavior actually doesn't make much sense to me; it doesn't seem like, in practive, you'd ever have immediate siblings that could be some class (or whatever) that you don't expect. Selecti

[jQuery] Re: next() problems

2007-08-31 Thread Karl Swedberg
Hi Sean, Actually, you can't use .next() in that situation. The argument for .next() acts as a filter for what the very next sibling can be. So, jQuery(this).next('#someId) will only select the very next sibling, and only if it has an id of "someId" cf. http://docs.jquery.com/Traversing/ne

[jQuery] Re: next() problems

2007-08-31 Thread duma
Actually, since next() takes a selector as an argument, you can use next(). Just do something like the following: jQuery("div.faq h4").click(function() { jQuery(this).next("#WhateverClass").addClass("top"); }); Sean Karl Swedberg-2 wrote: > > The .next() method will only select the very n

[jQuery] Re: next() problems

2007-08-30 Thread Karl Swedberg
The .next() method will only select the very next sibling. If you have other siblings in between the two h4s, you'll need to use a different selector. You could try this instead: jQuery('div.faq h4').click(function() { jQuery('~ h4:first', this).addClass('top'); }); That'll find the first

[jQuery] Re: next() problems

2007-08-30 Thread Josh Nathanson
Next() will only get siblings -- can you post the html? -- Josh - Original Message - From: "ruperdupe" <[EMAIL PROTECTED]> To: "jQuery (English)" Sent: Thursday, August 30, 2007 11:36 AM Subject: [jQuery] next() problems What I'm trying to do is when someone clicks on a h4 headin

[jQuery] Re: next anchor tag in list

2007-08-14 Thread b0bd0gz
Awesome, that works perfectly, Thanks for the help. b0bd0gz -- View this message in context: http://www.nabble.com/next-anchor-tag-in-list-tf4267089s15494.html#a12149963 Sent from the JQuery mailing list archive at Nabble.com.

[jQuery] Re: next anchor tag in list

2007-08-14 Thread Glen Lipka
Ahh, ok. $("a.next").click( function() { alert( $("ul.thumbs a.selected ").parent().next("li").children("a:first").attr("href") ); I think this could be more succinct, but it works. Glen On 8/14/07, b0bd0gz <[EMAIL PROTECTED]> wrote: > > > > Here's a link to the html >

[jQuery] Re: next anchor tag in list

2007-08-14 Thread b0bd0gz
Here's a link to the html http://b0bd0gz.adsl24.co.uk/html.txt html link hopefully this will work. b0bd0gz -- View this message in context: http://www.nabble.com/next-anchor-tag-in-list-tf4267089s15494.html#a12148273 Sent from the JQuery mailing list archive at Nabble.com.

[jQuery] Re: next anchor tag in list

2007-08-14 Thread Glen Lipka
Maybe post the example online somewhere. Strange though, I can write a link foo Glen On 8/14/07, Alex Ezell <[EMAIL PROTECTED]> wrote: > > > Looks like Nabble is eating the HTML when you post from there. > > /alex > > On 8/14/07, b0bd0gz <[EMAIL PROTECTED]> wrote: > > > > > > Sorry about that lis

[jQuery] Re: next anchor tag in list

2007-08-14 Thread Alex Ezell
Looks like Nabble is eating the HTML when you post from there. /alex On 8/14/07, b0bd0gz <[EMAIL PROTECTED]> wrote: > > > Sorry about that list it should look like this > > > full_img/dh0215co4.jpg first link > full_img/34220_1605__364lo.jpg second link

[jQuery] Re: next anchor tag in list

2007-08-14 Thread b0bd0gz
Sorry about that list it should look like this full_img/dh0215co4.jpg first link full_img/34220_1605__364lo.jpg second link full_img/122120_7132__239lo.jpg third link html of the button # next What I want is when you click

[jQuery] Re: next anchor tag in list

2007-08-14 Thread Glen Lipka
Where are the links? You just have the path? You can get an href value with the attr() function. $("a").attr("href") will return the value inside an a href parameter. You can also get the next link with the next function $("1").click( function() { alert($(this).next("a").attr("href"); } ); Th

[jQuery] Re: Next / Previous Links

2007-05-18 Thread Sean Catchpole
Yup, you go it! ~Sean

[jQuery] Re: Next / Previous Links

2007-05-18 Thread Bradley Holloway
t; <[EMAIL PROTECTED]> To: Sent: Thursday, May 17, 2007 11:56 PM Subject: [jQuery] Re: Next / Previous Links Hi Brad, I got the HTML from the link you posted. So try this (somewhere in ): var linklist = new Array(); var currlink = 0; $(function(){ $("#vidLinks, #vidLinks2, #

[jQuery] Re: Next / Previous Links

2007-05-17 Thread Sean Catchpole
Hi Brad, I got the HTML from the link you posted. So try this (somewhere in ): var linklist = new Array(); var currlink = 0; $(function(){ $("#vidLinks, #vidLinks2, #vidLinks3, #vidLinks4").find("li a").each(function(){ linklist[linklist.length] = this.onclick; }); $("#nextLink

[jQuery] Re: Next/Previous Links

2007-05-16 Thread Sean Catchpole
I was storing the onclick text, and eval() evaluates a string of javascript. This means that the functions that would be executed on click would instead be executed right then (at the eval). I hope that helps. ~Sean

[jQuery] Re: Next/Previous Links

2007-05-16 Thread Bradley Holloway
;Sean Catchpole" <[EMAIL PROTECTED]> To: Sent: Wednesday, May 16, 2007 2:26 PM Subject: [jQuery] Re: Next/Previous Links I would construct a list of links, and then keep a "current" pointer to which one is being displayed. var linklist = new Array(); $("#vidLinks, #vi

[jQuery] Re: Next/Previous Links

2007-05-16 Thread Alexandre Plennevaux
Ok, here is what i would do: 1/ develop for people that do not have javascript enabled. So instead of using anchors pointing to an image, use variables in your urls. http://manhattanwest.com/media-center/video-images.php#link13 Becomes http://manhattanwest.com/media-center/video-images.php?li

[jQuery] Re: Next/Previous Links

2007-05-16 Thread Sean Catchpole
I would construct a list of links, and then keep a "current" pointer to which one is being displayed. var linklist = new Array(); $("#vidLinks, #vidLinks2, #vidLinks3, #vidLinks4").find("li a").each(function(){ linklist[linklist.length] = this.onclick; }); //example next: eval(linklist[2]); ~