How to get id of previous element by using mouseovered element's id which was taken from its class
<p>I did this but it didn't work. Can anyone help me? Thanks.</p>

<pre><code>$('.current_element').mouseover(function() {
   var currentElementId = $(this).attr('id');
   var previousElementId = $('#' + currentElementId).prev('.previous_element').attr('id');
});
</code></pre>
