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-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?
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?
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
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
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;
});
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@
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
8 matches
Mail list logo