title: JQuery UI with icon on the right side of an hyperlink
body: <p>I'm trying to place an icon (using JQuery UI theme) on the right side of an hyperlink. However the best satisfactory result I had was an Icon on the far right side of the page, and not immediately after the actual text. The easiest option would be to have an <code>&lt;IMG&gt;</code> tag after the text, but the icon needs to be styled with the current theme.</p>
  
  <p>This is what I have :</p>
  
  <pre><code>....
  &lt;a href="#" id="contractLink" target="_blank" class="left-margin"&gt;
      &lt;span id="contractLinkText"&gt;Loading...&lt;/span&gt;
  &lt;/a&gt;
  ...
  &lt;script type="text/javascript"&gt;
  $(function() {
     $('#contractLink')
         .append($('&lt;div&gt;&lt;/div&gt;')
                    .addClass('ui-icon ui-icon-newwin')
                    .css({'float':'right', 'border':'1px solid blue'})
         );
  });
  &lt;/script&gt;
  </code></pre>