[jQuery] Re: xml find element with this attribute value

2008-10-24 Thread Robert Koberg
On Oct 24, 2008, at 2:35 AM, akel wrote: i've been reading a lot and still does not find any solution to my query. please find the details below. in jquery how can i automatically find the element sample with attribute name equals to a without looping entirely the xml jQuery supports

[jQuery] Re: xml find element with this attribute value

2008-10-24 Thread Karl Swedberg
On Oct 24, 2008, at 7:09 AM, Robert Koberg wrote: On Oct 24, 2008, at 2:35 AM, akel wrote: i've been reading a lot and still does not find any solution to my query. please find the details below. in jquery how can i automatically find the element sample with attribute name equals to a

[jQuery] Re: xml find element with this attribute value

2008-12-09 Thread James Darnell
So you've essentially told us that the syntax provided above is no longer usable without providing us with an alternative that is... Responding with something we can use (without having to install an unnecessary plugin) would have been beneficial. On Oct 25, 9:42 am, Karl Swedberg <[EMAIL PROTECT

[jQuery] Re: xml find element with this attribute value

2008-12-09 Thread Karl Swedberg
Sheesh, James. I was actually trying to help by offering both a correction and a link to John Resig's plugin (which *is* necessary if you want to use the xpath syntax). Anyway, here is how you can select elements that have a particular attribute value: $('sample[name=a]') http://docs.jque

[jQuery] Re: xml find element with this attribute value

2008-12-09 Thread Jay Darnell
I do sincerely apologize for my tone in my previous message. It's merely all too common for me to spend hours researching something I know should be fairly "simple" only to find scores of pages full of posts telling me how not to do it but not taking the time to tell me how to do it right. Thank yo

[jQuery] Re: xml find element with this attribute value

2008-12-09 Thread Karl Swedberg
:) Here are a couple other resources that you might find helpful: http://www.learningjquery.com/2006/11/how-to-get-anything-you-want-part-1 http://codylindley.com/jqueryselectors/ --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Dec 9, 2008, at 7:18 PM, Jay

[jQuery] Re: xml find element with this attribute value

2008-12-09 Thread Charlie Griefer
I haven't seen the codylinley.com one yet, but i *love* the how-to-get-anything-you-want-part-1 (and it's sequel). just wanted to say thanks for that. um... thanks! :) On Tue, Dec 9, 2008 at 5:57 PM, Karl Swedberg <[EMAIL PROTECTED]> wrote: > :) > Here are a couple other resources that you might

[jQuery] Re: xml find element with this attribute value

2008-12-11 Thread Crazy-Achmet
Hey, i couldn't get it to work! This is my code to get all the event nodes. $(xml).find('event').each(function(){ var name = $(this).attr('name'); $('').html(n

[jQuery] Re: xml find element with this attribute value

2008-12-11 Thread ricardobeat
$(xml).find('event[test]').each(function(){ var name = $(this).attr('name'); $('').html(name).appendTo ('#select_event'); }); or $(xml).find('event').each(function(){ if ( $(this).attr('test') ) { // do something special } else { var name = $(this).attr('name'); $(''