I have the below style of list items.

```
<li onclick="set_item('BRISBANE')" data-lat="-27.46758" data-lng="153.027892">
    BRISBANE QLD 4000
</li>

```

When the item is clicked its getting the information but how can I get the other 2 items in other 2 textboxes?

HTML

```
<input type="text" id="country_id" onkeyup="autocomplet()">
<input type="text" id="latitude">
<input type="text" id="longitude">

```

JavaScript

```
function set_item(item) {
    $('#country_id').val(item);
    $('#country_list_id').hide();
    var $this = $(this),
        lng = $this.data('lng'),
        lat = $this.data('lat');
    $('#latitude').val(lat); 
    $('#longitude').val(lng);
    alert($this.data('lng'));
}

```

I tried to use the above JS to use `$this.data('lng')` but not sure why its not working.