You can't just use .prev() or .next() because the links are within
list items. Instead, you'll need to do something like this:
$('a.active').parent().prev().find('a')
and this:
$('a.active').parent().next().find('a')
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.
$('.active').prev()
$('.active').next()
Rate me please if I helped.
On Dec 28, 2:30 am, Toaster wrote:
> Hello.
>
> Example:
>
>
>
>
>
>
>
> How would I be able to get find the next or previous in relation
> to the ?
>
> I'd appreciate it if anybody could help me out with
Karl,
I choose to keep my original approach as it was better for code
clarity in my case.
>From within my function, I could select the text input passed as
argument with variable $currentField.
I could also get the list of other text inputs located after it.
$afterFields.length correctly counts t
Hi Karl,
Thanks for your interesting alternative approach.
On my side I was trying to set a jQuery variable using the argument
that was passed to the function.
But something seems broken if we don't use jQuery from the very
beginning for the selection.
$.tmp = caller;
alert($.tmp);// displa
Hi Julien,
May I propose a different way?
$('input:checkbox, input:text').bind('change focus', function(event) {
if (event.type == 'change' || this.type == 'text') {
$(this).parent().nextAll().find('input:text').doSomething();
}
});
This selects all checkboxes and text inputs and binds
Thanks a lot, Karl. Your code dit it.
Now are several events (like key strokes and checkbox changes) for
which the same code must be run.
So, I would like to retrieve the siblings from within a function.
The problem I encounter with the code below is how to retrieve in
jQuery the "caller" argume
Provided that all the text inputs located after it are within the same
, this should do it:
$('input:text').change(function() {
$(this).parent().nextAll().find('input:text').doSomething();
});
If you need to check in multiple s or s, we'll need to
tweak the DOM traversal to match the oth
Hi again,
My question was probably too long as I got no answer...
When a change occurs is one of the following text fields, does someone
know how to scan through all the text inputs located after it?
...assuming that there are more fields and I need some jQ
This is a super popular plugin for what you ask
http://jquery.thewikies.com/swfobject/
On Aug 17, 6:45 pm, Vaishu wrote:
> Hi,
>
> I am looking for a piece of code where I can find out if client browser
> (any) supports flash.
> If no, then I need to display message.
>
> Please help.
Conclusion - it can't be done.
Workround:
$("A").filter(function() {
return $(this).attr("href") == href);
});
On Jul 2, 12:14 pm, Nikki Locke wrote:
> I am writing a test harness for a web app using jquery. When recording
> a test, I add handlers for user interaction events (e
Thanks for the help (and the tip!) It all worked excellently :)
Cheers,
Paul
On Jun 16, 7:19 pm, mkmanning wrote:
> $('ul').find('li[typeref=E][typeid=1]')
>
> NB: an id attribute that starts with a number isn't valid markup.
>
> On Jun 16, 10:05 am, Paul Hutson wrote:
>
>
>
> > Hello,
>
> >
$('ul').find('li[typeref=E][typeid=1]')
NB: an id attribute that starts with a number isn't valid markup.
On Jun 16, 10:05 am, Paul Hutson wrote:
> Hello,
>
> I've been trying to work this out for a bit now but seem to have come
> a bit unstuck.
>
> I'd like to be able to use .find to search a
Marv -
I could be mistaken here, but I think your solution's really good so
long as the entire sub-element (the DIV or image or whatever) is
visible. But if there's a scrollbar on that element, I think your code
will only tell you where you clicked in terms of the position on the
page (relative t
Here's an excerpt from my click event that determines the mouse
coordinates for a click regardless of horizontal / vertical scrolling
of the page or the clicked image:
$('#img1').live('click', function(e) {
var locX = Math.round(e.pageX - $(this).offset().left);
var locY = Math.
We ended up using scrollTop to determine the amount of the div that
was obscured.
I'm new to jQuery (and javascript in general), so my code could
probably stand to be refactored a bit. But here's the solution we came
up with.
The relevant structure of the page is:
... (this runs horizontally,
Glad I could help. I haven't seen this problem before even though it
does seem like quite a common thing to need to do.
I think with a bit more work you could come up with a more elegant
work around such as using the append/prepend function in conjunction
with say the and tags. Although whatev
You are right, that did work. Thanks, I really appreciate your help
on this!
Had you run into this issue before?
On Apr 13, 3:33 pm, Ryan wrote:
> In my tests wrapping your full test html page in the div seems to
> work. Not pretty but works.
>
> On Apr 13, 11:29 pm, Nic Hubbard wrote:
>
> >
In my tests wrapping your full test html page in the div seems to
work. Not pretty but works.
On Apr 13, 11:29 pm, Nic Hubbard wrote:
> Yeah, but my page returns a full HTML page, so I need to do something
> like:
>
> $("body").wrapInner('');
>
> Which, does not seem to work.
>
> On Apr 13, 3
Yeah, but my page returns a full HTML page, so I need to do something
like:
$("body").wrapInner('');
Which, does not seem to work.
On Apr 13, 3:14 pm, Ryan wrote:
> In that case you would need to add something like
>
> html = ''+html+'';
>
> to your function. Its a bit of an ugly hack I know.
In that case you would need to add something like
html = ''+html+'';
to your function. Its a bit of an ugly hack I know.
Having played with it a bit now. I think your probably right about it
being a jquery bug. It might be worthwhile exploring which function
the problem lies with then submitti
Hey, that actually worked! But, why would this have helped? And, is
there a way around this, since the real form that I need to get, I
cannot wrap a div around.
On Apr 13, 2:46 pm, Ryan wrote:
> If you wrap your form in a div I think it should work - haven't tested
> it
>
> R
>
> On Apr 13, 10
If you wrap your form in a div I think it should work - haven't tested
it
R
On Apr 13, 10:22 pm, Nic Hubbard wrote:
> Could this be a jQuery bug?
>
> On Apr 13, 2:13 pm, James wrote:
>
> > I still haven't figured it out, but playing around and setting the
> > ajax response as a jquery objec
Could this be a jQuery bug?
On Apr 13, 2:13 pm, James wrote:
> I still haven't figured it out, but playing around and setting the
> ajax response as a jquery object, $(html), and making it global so I
> can view it's attributes through Firebug, I was able to locate the
> form element on the ajax
I still haven't figured it out, but playing around and setting the
ajax response as a jquery object, $(html), and making it global so I
can view it's attributes through Firebug, I was able to locate the
form element on the ajax response. It was the index-5 element for your
test page. My sample cod
Just a guess here - is it possible that jquery will not recognize
nodes that are loaded after the document is first rendered? Do you
need to rebind?
On Apr 13, 4:28 pm, Nic Hubbard wrote:
> Ok, my test now reflects your suggestions. But, sadly, none of that
> helped, it is still returning unde
Ok, my test now reflects your suggestions. But, sadly, none of that
helped, it is still returning undefined. :(
On Apr 13, 1:03 pm, Nic Luciano wrote:
> Hey Nic,
>
> I have a couple small recommendations- hopefully one will fix the issue.
>
> Try using $.get() instead of $.ajax, and specify "ty
Hey Nic,
I have a couple small recommendations- hopefully one will fix the issue.
Try using $.get() instead of $.ajax, and specify "type" option as "html"-
alternatively, you can use $.load() if your ultimate purpose is to inject
this HTML into DOM.
In addition rather than using find(), just sel
Nope, that does not work either.
On Apr 13, 12:20 pm, Jack Killpatrick wrote:
> Maybe try:
>
> success: function(html){
> alert($(html).find('form').attr('action'));
>
> I had some issues in the past using form id's with the jquery form
> plugin, but usually getting it using 'form' worked.
>
>
Yes, this is very odd. I have tried it quite a few ways, but I can
never target the form. Any other ideas?
It is frustrating because I really need to target a form in the html
response...
On Apr 13, 11:45 am, James wrote:
> That's strange. I can't get it to work either and I'm getting the same
Nope, that returns undefined as well. :(
On Apr 13, 11:34 am, Nathan wrote:
> You could try changing this: alert($(html).find("#test").attr
> ('action'));
> To This: alert($("#test").attr('action'));
>
> On Apr 13, 9:47 am, Nic Hubbard wrote:
>
> > Test page to show the problem:http://www.puc.e
Maybe try:
success: function(html){
alert($(html).find('form').attr('action'));
I had some issues in the past using form id's with the jquery form
plugin, but usually getting it using 'form' worked.
That said, since the response isn't in the DOM yet, I'm not sure if that
might present an is
That's strange. I can't get it to work either and I'm getting the same
results as you (I can get #test2, but not #test). I've even truncated
the response down to as if you're only receiving the part and
it still doesn't work. I'd be interested in seeing what happens here
too.
On Apr 13, 6:47 am
You could try changing this: alert($(html).find("#test").attr
('action'));
To This: alert($("#test").attr('action'));
On Apr 13, 9:47 am, Nic Hubbard wrote:
> Test page to show the problem:http://www.puc.edu/dev/tests/ajax-test
>
> On Apr 13, 9:33 am, Nic Hubbard wrote:
>
>
>
> > I am pulling
If I understand correctly what you are tring to do, I think what you
are looking for is the live() event
http://docs.jquery.com/Events/live
On Apr 13, 5:47 pm, Nic Hubbard wrote:
> Test page to show the problem:http://www.puc.edu/dev/tests/ajax-test
>
> On Apr 13, 9:33 am, Nic Hubbard wrote:
Test page to show the problem: http://www.puc.edu/dev/tests/ajax-test
On Apr 13, 9:33 am, Nic Hubbard wrote:
> I am pulling my hair out over this. I swear that this is a bug.
>
> For some reason, I CANNOT target any forms within the html response.
> I have tried very simple examples and it stil
I am pulling my hair out over this. I swear that this is a bug.
For some reason, I CANNOT target any forms within the html response.
I have tried very simple examples and it still won't work. Here is
what I have, that still returns undefined:
HTML:
http://test.com";>
this is my text
jQuery:
I wanted to avoid putting id's on them, also an id has to start with a
letter.
I've just done this, and it works charmingly
var eq = $(this).parent().children("a").index(this);
MorningZ wrote:
":eq" is a selector, not a property (certainly a BIG difference)
i'm not sure how you expected
":eq" is a selector, not a property (certainly a BIG difference)
i'm not sure how you expected anything but nothing from
var eq = $(this).eq();
do your links have IDs on them?if they did then:
this.children("a").click(function() {
var idx = -1;
var LinkId = $(this).id;
$(thi
On Feb 20, 2:44 am, Nicolas R wrote:
> I know that this is not the place to post my question but here it is.
> If someone knows a better place please do inform.
The best place to ask questions related to javascript is
comp.lang.javascript. Since you are using Google Groups and
comp.lang.javas
I don't think the cat has any skin left. Or does it?
-Trey
On Feb 13, 3:14 am, mkmanning wrote:
> If the input doesn't exist, then wouldn't nothing be returned with $
> ('input').parent().children(':last') either? It seems to presume the
> existence of the input :)
>
> Maybe you meant if the
If the input doesn't exist, then wouldn't nothing be returned with $
('input').parent().children(':last') either? It seems to presume the
existence of the input :)
Maybe you meant if the input doesn't have siblings, then nothing is
returned, which is true using nextAll(). Using 'input' with no e
If the input doesn`t exist nothing will be returned with nextAll. Same
with jQuery Lover's approach. That's we need to get all the children:
$('input').parent().children(':last')
or alternatively
$('input').siblings().andSelf().filter(':last-child') // I'd bet the
other one is faster
As Mike M
Last child method, definitely better. :-)
On Feb 11, 10:13 pm, Nic Luciano wrote:
> $("div :last-child");
>
> (or this wacky way I tried before I learned CSS selectors
> $("div").children()[$("div").children().size() - 1])...)
>
> Nic
> Lucianohttp://www.twitter.com/niclucianohttp://www.lin
If you want selector without using $(this) there is another way:
$("input ~ *:last");
PS. I also like mkmanning's aproach...
Read jQuery HowTo Resource
http://jquery-howto.blogspot.com
On Thu, Feb 12, 2009 at 11:19 AM, mkmanning wrote:
>
> Somehow the selector disappeared :P
>
> $('inp
Somehow the selector disappeared :P
$('input').nextAll(':last');
$(this).nextAll(':last');
On Feb 11, 10:17 pm, mkmanning wrote:
> $("div :last-child"); finds all of the last-child elements, including
> descendant elements (e.g. if there were an inside the span in
> your example it would be
$("div :last-child"); finds all of the last-child elements, including
descendant elements (e.g. if there were an inside the span in
your example it would be returned too). You can also not worry about
the parent at all and just use the sibling selector:
//or you could use :last-child
As Rica
$(this).parent().children(':last') //or :last-child - assuming 'this'
is the input element
On Feb 12, 3:09 am, Risingfish wrote:
> Thanks Nic,
>
> How about if I'm using the input tag as the base? Can I do something
> like $("self:parent:last-child") ?
>
> On Feb 11, 8:13 pm, Nic Luciano wrote:
Thanks Nic,
How about if I'm using the input tag as the base? Can I do something
like $("self:parent:last-child") ?
On Feb 11, 8:13 pm, Nic Luciano wrote:
> $("div :last-child");
>
> (or this wacky way I tried before I learned CSS selectors
> $("div").children()[$("div").children().size() -
$("div :last-child");
(or this wacky way I tried before I learned CSS selectors
$("div").children()[$("div").children().size() - 1])...)
Nic Luciano
http://www.twitter.com/nicluciano
http://www.linkedin.com/in/nicluciano
On Wed, Feb 11, 2009 at 9:49 PM, Risingfish wrote:
>
> Hi James, apo
Hi James, apologize for not being more precise. I'm using the input
element as my base reference. So using that input element, I want to
get the last sibling under the div. You are correct that if the span
is not then the input is what I want. I may need to add more tags
later (I'm sure you know h
When you say "last sibling in a parent", what does that mean? Which
element is your base reference?
In your example:
...
Do you mean your is the base reference, and you want to find the
last child (thus, ) relative to that?
And if is not there, you want ?
On Feb 11, 4:12 pm, Risingfish
Before I accidentally hit enter, this is what I was trying to type: :)
...
The span might or might not be there, so I would like to just get the
last sibling in a parent.
Thanks!
On Feb 8, 12:06 am, Alec wrote:
> Is this the right way to do this? Or is there an easier/better way? I
> was hoping for something like this:
>
> HTML
> something here
> something else
>
> SCRIPT that does:
> search for an element that starts with #entry; and then explode on ';'
> to find the ent
Figured it out thanks. $("#ID") didn't realize it was on the
documentation either
On Jan 8, 12:47 pm, Mastro wrote:
> I'm new to Jquery, and wondering how in JS using JQ how I can find a
> specific control on a page based off it's ID. Also can I use
> it's .net ID, or do I need to use the Clie
According to the docs, you should use dataType: 'html' for this, the
script tags will be evaluated when inserted in the DOM.
Also, you can try $(src).contents().filter('script'), might work in
IE.
On Nov 6, 4:01 pm, axemonkey <[EMAIL PROTECTED]> wrote:
> Hi all. I'm having an amazing amount of p
uot;href"));
> });
> });
> }
I'll test what the performance is for eacvh of those methods, thanks
for the advice.
- jake
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jake McGraw
> Sent: Tuesday, December 02, 2008 7:09 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: finding
'').replace(/on\w+\s*=\s*(['"])
[^"'>]+\1/gi,'');
$("a", html).each(function(){
makeRequest($(this).attr("href"));
});
});
}
-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jake McGraw
Sent: Tuesday, December 02, 2008 7:09 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: finding
Whoops, not trying to top post, but I believe our threads are related,
in that we're both processing HTML from an AJAX request.
Sorry,
- jake
On Tue, Dec 2, 2008 at 10:08 AM, Jake McGraw <[EMAIL PROTECTED]> wrote:
> I'm using jQuery AJAX to recursively spider a website to build a
> sitemap.xml f
I'm using jQuery AJAX to recursively spider a website to build a
sitemap.xml file. I'll acknowledge that this is an ass backwards
method for building a sitemap, but let's put aside that issue. My
issue is that I'd like to be able to parse anchors in each page, but
not execute the JavaScript on the
WOW!
MuCH respect and thanks to you Hector.
I am most grateful (again!).
Cheers! -Alan
On Nov 19, 1:04 pm, "Hector Virgen" <[EMAIL PROTECTED]> wrote:
> Oops, 'class' is a reserved word. I also had a typo in the function.. I
> tested this code and it works:
> $.each($(document.body).attr('clas
Oops, 'class' is a reserved word. I also had a typo in the function.. I
tested this code and it works:
$.each($(document.body).attr('class').split(' '), function(key, value)
{
$('h3.' + value).addClass('foundMatch');
});
-Hector
On Wed, Nov 19, 2008 at 10:00 AM, alanfluff
<[EMAIL PROTECTED]>
Hey Hector,
Thanks lots for looking at this for me -- I tried it and it doesn't
seem to add the class.
A typo maybe? I've tried commenting out all my jQuery (not much) in
case it conflicted, but no change.
Thanks again very much, for your reply. Cheers, -Alan
On Nov 19, 11:35 am, "Hector Virg
This may be a little longer but it checks each body class individually:
$.each($(document.body).attr('class').split(' '), function(class)
{
$('h3.' + class).addClass('foundMatch');
});
-Hector
On Wed, Nov 19, 2008 at 8:30 AM, alanfluff <[EMAIL PROTECTED]>wrote:
>
> Hey Liam,
>
> No worries!
Hey Liam,
No worries! And I have been called a lot worse than 'Andy' ;)
Good luck in your learning of jQuery too - it is brilliant and I am
just greedy to know much more too quickly ;)
Cheers, -Alan
On Nov 19, 11:07 am, Liam Potter <[EMAIL PROTECTED]> wrote:
> I'm afraid I cannot help any fur
and sorry for calling you Andy.
alanfluff wrote:
Thanks SO much Liam.
This works but I was looking for triggerClass to flow from the classes
found in BODY (rather than being a static class defined in jQuery).
So if BODY had classes: classOne classTwo classThee and an H3 on my
page had a class
I'm afraid I cannot help any further Alan, I'm still learning jQuery
myself .
I'd guess it would have something to do with storing the class of the
body in a var and of the h3 in a different var.
Compare these two var's and if they match continue to add the foundMatch
class to the h3.
I havn
Thanks SO much Liam.
This works but I was looking for triggerClass to flow from the classes
found in BODY (rather than being a static class defined in jQuery).
So if BODY had classes: classOne classTwo classThee and an H3 on my
page had a class of classTwo, then the script would spot the match a
you won't need the if statement.
$(document).ready(function(){
$("[EMAIL PROTECTED]'triggerClass']
[EMAIL PROTECTED]'triggerClass']").addClass("foundMatch");
});
this will find the h3 with a class of triggerClass, found within a body
tag with the class of triggerClass and add the foun
Thanks, MorningZ. Tidied up your quote nesting and it worked a treat.
Bit of a braindead moment for me... I sometimes forget how painfully
simple and elegant jQuery is. :)
Keep in mind that the selector is simply a *string*, so you need to
feed it a string... .
$("label[for=' + this.attr("id") + ']").attr('class', 'error');
On Nov 10, 11:24 am, Pete <[EMAIL PROTECTED]> wrote:
> What's the easiest way to find an input's label? I'm trying to
> evaluate this along
ok, this has stopped the error, but it was only returning the id of the
first div.msg it found, I changed it to this
var uid = $("span#yes"+
inc).parent().parent().parent().attr("id").replace('msg', "");
which is now working.
Thanks for the help guys.
Richard D. Worth wrote:
Change
$(".
Change
$(".msg").id
to
$(".msg").attr("id")
- Richard
On Fri, Nov 7, 2008 at 7:27 AM, Liam Potter <[EMAIL PROTECTED]> wrote:
>
> The error I get in firebug is
>
> $(".msg").id is undefined
>
> basically what I'm trying to do is pass this into an ajax post to delete
> the message, so it's vita
The error I get in firebug is
$(".msg").id is undefined
basically what I'm trying to do is pass this into an ajax post to delete
the message, so it's vital the id is the same one from the database.
MorningZ wrote:
"but this doesn't work."
Care to elaborate?do you get an error? unexpec
"but this doesn't work."
Care to elaborate?do you get an error? unexpected results?
something else?
On Nov 7, 7:19 am, Liam Potter <[EMAIL PROTECTED]> wrote:
> Hi guys, this should be a quick one
>
> I have a div, which has a unqiue id (pulled from the database) so
> something like this.
>
Here is the answer, thanks to digilover over at the SitePoint
forums...
function initMenu() {
$('#groups ul').hide();
$('#groups li a').click(
function() {
$(this).next().slideToggle('normal',function(){
var i
No problem. Thank you all for all your help... and quickly!
On Sep 18, 6:03 am, MorningZ <[EMAIL PROTECTED]> wrote:
> yeah, my mistake on my post, shouldn't have had "#" in it
yeah, my mistake on my post, shouldn't have had "#" in it
$('div[id^=test]').hide();
:)
if it doesnt work i think its just a case of syntax
$("[EMAIL PROTECTED]").hide();
On Sep 17, 9:14 pm, ripple <[EMAIL PROTECTED]> wrote:
> Try this.
>
> $("div[id*=test]").hide();
>
> The second attempt evaulates the text in the div. Not the id of the div
Try this.
$("div[id*=test]").hide();
The second attempt evaulates the text in the div. Not the id of the div.
--- On Wed, 9/17/08, MACE <[EMAIL PROTECTED]> wrote:
From: MACE <[EMAIL PROTECTED]>
Subject: [jQuery] Finding DIVS with similar IDs
To: "jQuery (English)"
Date: Wednesday, Septemb
"^=" means "starts with" (http://docs.jquery.com/Selectors/
attributeStartsWith#attributevalue)
$("div#[id^='test']").hide()
Thank you. Still no luck though - it says "...is open" no matter if
it's open or closed. Here's what my function looks like now:
function initMenu() {
$('#groups ul').hide();
$('#groups li a').click(
function() {
$(this).next().slideToggle('
Hi Michael,
You're doing the slideToggle() on $(this).next(), but checking the
visibility state of $(this). I imagine that the link you're clicking
is always visible. You should probably do a check for $
(this).next().is(':hidden')
--Karl
Karl Swedberg
www.englishrules.com
On 8 sep, 13:18, Ca-Phun Ung <[EMAIL PROTECTED]> wrote:
> Olivier wrote:
> > How to find the elements with the id beginning by "myID_" and
> > terminated with any number
> > like "myID_25789".
>
> Try this:
>
> $('*[id^="myID_"]').filter(function(){
> return (/\_[0-9]+$/).test($(this).attr('id
if you have div`s then,
$('div[id^="myID_"]')
On 8 сент, 13:15, Olivier <[EMAIL PROTECTED]> wrote:
> How to find the elements with the id beginning by "myID_" and
> terminated with any number
> like "myID_25789".
Olivier wrote:
> How to find the elements with the id beginning by "myID_" and
> terminated with any number
> like "myID_25789".
>
Try this:
$('*[id^="myID_"]').filter(function(){
return (/\_[0-9]+$/).test($(this).attr('id'));
});
Docs:
http://docs.jquery.com/
Selectors:
http://docs.jquery.com/Selectors
Attributes filters
http://docs.jquery.com/Selectors/attributeStartsWith#attributevalue
any DOM element has a property called "nextSibling", which points to the
very next DOM element, text/html/whatever.
var ns = $('#search')[0].nextSibling;
var ns = document.getElementById ('search').nextSibling;
On Tue, Sep 2, 2008 at 4:43 PM, Finding_Zion <[EMAIL PROTECTED]>wrote:
>
> I need to
Of course - obvious mistake, sorry to take up your time!
Thank you.
On Tue, Sep 2, 2008 at 9:42 PM, Mike Alsup <[EMAIL PROTECTED]> wrote:
>
> > Ok Mike Thanks, here is the example of the code, with the issue in tact.
> >
> > http://www.sixfive.co.uk/jq1/
> >
> > The XLS button is the key on this
> Ok Mike Thanks, here is the example of the code, with the issue in tact.
>
> http://www.sixfive.co.uk/jq1/
>
> The XLS button is the key on this page - clearly there is no styling.
>
> The objective is to make the user is able to hit enter on the form, and have
> the 'Display Button' run the sea
Ok Mike Thanks, here is the example of the code, with the issue in tact.
http://www.sixfive.co.uk/jq1/
The XLS button is the key on this page - clearly there is no styling.
The objective is to make the user is able to hit enter on the form, and have
the 'Display Button' run the search form, NOT
> Using sDumper( $(this).parents('form') ); to dump the result visually
>
> I can see that length = 0, and there is only one parent object - tagName =
> 'IMG'
>
> So to me at least it doesnt look like its doing what it should?
>
> Any further help would be great - thanks!
I think you need to po
Sorry I got cut off.
Using sDumper( $(this).parents('form') ); to dump the result visually
I can see that length = 0, and there is only one parent object - tagName =
'IMG'
So to me at least it doesnt look like its doing what it should?
Any further help would be great - thanks!
On Tue, Aug 26,
Thanks chaps, there is no nesting of forms, I know thats invalid. Here is
what the code looks like
Shop > Active Products
Hi,
You need to go up and then over. Inside your click handler, do this:
$(this).parent().next();
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Aug 25, 2008, at 5:17 AM, Sarbesh wrote:
is it possible to find the next tr from td using next() or any othe
Thanks, Karl.
Yes, that definitely works, and it's the preferred method if you have
nested tables.
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Aug 20, 2008, at 5:51 PM, ak732 wrote:
If I have a table:
/*many more cells here*/
/*many more ce
I tried turning off "Friendly Errors". still it is giving the same
error. I am using XMLHttpRequest.status and XMLHttpRequest.statusText
in the error function to determine the error. is there any other
property that i can use?
On Jul 24, 11:59 pm, MorningZ <[EMAIL PROTECTED]> wrote:
> Turn off "F
I don't think that'll work out as you expect... $(selector).focus() GIVES
$(selector) the focus, it doesn't test whether it already HAS focus.
Ideally there would be a selector such as :focus, fitting in with :enabled,
:selected, :hidden, and others.
j
On Mon, Jul 21, 2008 at 5:27 PM, jquertil <
Correct. The only way to reliably find out what element current has
focus is to bind a "focus" handler to all the elements that might take
focus on the page. When an element gets focus, you note it down. For
example:
var currentFocus = null;
$(':input').focus( function() {
currentFocus = this
Try stuffing values into a variable from the onFocus() event of each of the
tables.
Or add/remove an additional class when a table gets/loses focus. You can
find the focused table quickly that way, and apply different styling if
desired based on the class 'focused' or whatever.
j
On Sun, Jul 20
1 - 100 of 162 matches
Mail list logo