Help me with prev();

Help me with prev();

Hi dudes.

Someone help me with this code:

  1. var iconesObrigatorios = $("img[id$='_icone']");
  2. iconesObrigatorios.each
  3. (
  4.     function()
  5.     {
  6.         var idLabel = jQuery(this).attr('id');
  7.       
  8.         idLabel = idLabel.substr(0,idLabel.indexOf('_icone', 0) );
  9.         idLabel = idLabel.replace(/:/g, '\\:');
  10.             // i guess the error is here!!!
  11.         $('#' + idLabel).parents('span.p_AFRequired').prev(this).append(this)
  12.         $(this).css('float','right');
  13.     }
  14. )

and the html code is:

  1. <td class="celularFormulario">
  2.     <span class="af_AFRequired" style="float: left;">
  3.         <table>
  4.             <tbody>
  5.                 <tr>
  6.                     <td>
  7.                         <img src...
Why when i execute this code the image show style='float:right' ?
I need the TD with this style.

Help me please.

Ty dudes!