title: How to style an image that is added dynamically using jquery?
body: <p>I have made the html structure containing unordered lists, list items and attributes dynamically by a recursive function using jquery. Then I added an image inside the attribute tag. Now I want to style that image in a css file. The attribute tags also contains the name value from my json. I am showing all this in a context menu. I intend to show the image at the left side of the names. Currently the image that I add is appearing at the center and to the right of the name and the size of the image is too big as well. I want to adjust the position and size of the image. How can I do that in this case when I am adding the image dynamically? Here is the function that makes the html structure:</p>
  
  <pre><code>var getMenuItem = function (itemData) {
          var item = $("&lt;li&gt;")
              .append(
          $("&lt;a&gt;", {
              title : itemData.name,
              html : itemData.name
          }).append($("&lt;img&gt;", {"src": "Boma_1_2/Boma.png"})));
          if (itemData.children) {
              var subList = $("&lt;ul&gt;");
              $.each(itemData.children, function () {
                  subList.append(getMenuItem(this));
              });
              item.append(subList);
          }
          return item;
      }; 
  </code></pre>