I have list and I'm trying to write jQuery code to count previous li width than I hover on some element. For example if I hover third element I need to get first + second elements width.

```
<ul>
    <li>First</li>
    <li>Second</li>
    <li>Third</li>
    <li>Fourth</li>
</ul>

```

Code at the moment:

```
jQuery('ul li').each(function() {
    jQuery(this).hover(function () {
        jQuery(this).prevAll().width();
    });
});

```

But I get only one previous element width. Can anyone help, please?