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 indieh...@gmail.com wrote:
hi, any idea when the next version of jQuery is to be released?
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.
div
span class=mehey, it's me !!/span
spanand I'm his sibling/span
aand I am too/a
p
spanthough I am not
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 michel.bellevi...@gmail.com
wrote:
That's easy,
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
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 tmand...@gmail.com wrote:
Matt, thanks for your response.
I had originally posted this on
Thank you jpcozart. here's part of my html:
div class=form-item id=edit-question-900-wrapper
label for=edit-question-900Country of ED Submitter span
class=form-required title=This field is required.*/span: /
label
select name=question_900 class=form-select country
disabled=disabled
...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
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.
Adding the expr just filters the matched elements further. Try .nextAll
('select').
On Mar 29, 2:42 am, Dunc duncan.we...@gmail.com 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
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 =
Given this html:
table class=form
tr
td class=label width=200Category*/td
td
select name=ctl00$cphMain$repSkills
$ctl00$ddlSkillCategory_ID
id=ctl00_cphMain_repSkills_ctl00_ddlSkillCategory_ID
class=SkillCategory
option value=-1Skill or Service/option
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
Forgot to mention I was talking about jquery cycle. sorry. ;/
On Mar 27, 11:18 pm, Victor Nogueira victor.carcr...@gmail.com
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
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
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:
ul
thanks i got it to work, sort of.
$('#tabs img.albumImage').each(function(index)
{
var $img = $(this).data('tabindex', index);
$img.click(function()
{
next() finds the the unique next siblings for that element (in this
case their are none). You want the a 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
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
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 i got it to work, sort of.
$('#tabs img.albumImage').each(function(index
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 michaell...@gmail.com wrote:
next() finds the the unique next siblings for that element (in this
4, 1:01 pm, Joseph Le Brech jlebr...@hotmail.com wrote:
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
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());
});
form action=test.cfm
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());
});
div
p1/p
div
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; ips.length; i++) {...} loop
instead of the $.each for performance reasons and readability, but
that's personal taste.
by(e)
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 need
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 ricardob...@gmail.com wrote:
You can take advantage of the index passed to each. What you posted is
very close to
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
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 michaell...@gmail.com wrote:
And just a final note on
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)
Stephan
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:
ul
li
spanAnalysis/span
div class=accordionContent
pLorem Ipsum/p
/div
/li
That is absolutely completely invalid mark-up. You must have the
table inside the form, 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
The a element is inside a h3. 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()
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 scroll
$(#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
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?
--
$(#nav
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 next
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.
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.
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 you
Next() will only get siblings -- can you post the html?
-- Josh
- Original Message -
From: ruperdupe [EMAIL PROTECTED]
To: jQuery (English) jquery-en@googlegroups.com
Sent: Thursday, August 30, 2007 11:36 AM
Subject: [jQuery] next() problems
What I'm trying to do is when someone
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
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);
} );
This might
Sorry about that list it should look like this
ul class=thumbs
li full_img/dh0215co4.jpg first link /li
li full_img/34220_1605__364lo.jpg second link /li
li full_img/122120_7132__239lo.jpg third link /li
/ul
html of the button
#
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
ul class=thumbs
li full_img/dh0215co4.jpg first link /li
li
Maybe post the example online somewhere.
Strange though, I can write a link a href=/blah.htmfoo/a
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
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.
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
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.
-
From: Sean Catchpole [EMAIL PROTECTED]
To: jquery-en@googlegroups.com
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
head):
script type=text/javascript
var linklist = new
Yup, you go it!
~Sean
Hi Brad,
I got the HTML from the link you posted. So try this (somewhere in head):
script type=text/javascript
var linklist = new Array();
var currlink = 0;
$(function(){
$(#vidLinks, #vidLinks2, #vidLinks3, #vidLinks4).find(li
a).each(function(){
linklist[linklist.length] =
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
52 matches
Mail list logo