[jQuery] Re: Retrieving information outside of $this

2007-04-21 Thread SiCo
Very interesting thanks both of you, I will have a play later. My back up plan was to create an array of all the locations but I didn't want to store too much data. My first draft of the code is messy enough as it is calling the id's and name's from all the divs etc. There has to be a better way.

[jQuery] Re: Retrieving information outside of $this

2007-04-20 Thread Andy Matthews
: jquery-en@googlegroups.com Subject: [jQuery] Re: Retrieving information outside of $this Andy Matthews schrieb: > What?!?!? > > You can use html based pathing in jQuery? Why didn't someone tell me that?!? > > How come I get an error? > Sure I can! ;P What kind of error?

[jQuery] Re: Retrieving information outside of $this

2007-04-20 Thread Roman Weich
Andy Matthews schrieb: What?!?!? You can use html based pathing in jQuery? Why didn't someone tell me that?!? How come I get an error? Sure I can! ;P What kind of error?

[jQuery] Re: Retrieving information outside of $this

2007-04-20 Thread Andy Matthews
s.com Subject: [jQuery] Re: Retrieving information outside of $this Andy Matthews schrieb: > Sorry for the loads of emails. > > Using your exact code setup, this is what I came up with: > $('div.data a').click( function() { > var lat = > $(this).parent().parent().chi

[jQuery] Re: Retrieving information outside of $this

2007-04-20 Thread Roman Weich
Andy Matthews schrieb: Sorry for the loads of emails. Using your exact code setup, this is what I came up with: $('div.data a').click( function() { var lat = $(this).parent().parent().children('.editable').children('span').attr('name' ,'longitude').html(); alert(lat); re

[jQuery] Re: Retrieving information outside of $this

2007-04-20 Thread Andy Matthews
Sorry for the loads of emails. Using your exact code setup, this is what I came up with: $('div.data a').click( function() { var lat = $(this).parent().parent().children('.editable').children('span').attr('name' ,'longitude').html(); alert(lat); return false; });

[jQuery] Re: Retrieving information outside of $this

2007-04-20 Thread Andy Matthews
This should work: var lat = $(this).siblings('.editable b').get[0]; var lon = $(this).siblings('.editable b').get[1]; Or you could just store both in an array like so: var latlon = $(this).siblings('.editable b'); Then do latlon[0], latlon[1], etc. -Original Message- From: jquery-en@

[jQuery] Re: Retrieving information outside of $this

2007-04-20 Thread Andy Matthews
Ooops... This gets the latitude value: var lat = $(this).parent().parent().children('.editable').children('span').attr('name' ,'longitude').html(); Change it up to get longitude -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of SiCo Sent: Friday