Hi,

I want to get url attribute of li when user click on li.

Code:
<ul>
	<li url="http://www.google.com" id="1">Google</li>
	<li url="http://www.yahoo.com" id="2">Yahoo</li>
	<li url="http://www.bing.com" id="3">Bing</li>
	<li url="http://www.facebook.com" id="4">Facebook</li>
	<li url="http://www.amazon.com" id="5">Amazon</li>
</ul>
I found following but no idea how it will work

Code:
$('li').click(function() {
    alert($(this).data('url'));
});
Any idea how to get li url value when click using javascript or jquery?

- Thanks
Zohaib.