Skip to content

Instantly share code, notes, and snippets.

@eldewall
Created September 8, 2011 09:38
Show Gist options
  • Select an option

  • Save eldewall/1203030 to your computer and use it in GitHub Desktop.

Select an option

Save eldewall/1203030 to your computer and use it in GitHub Desktop.
MenuDiv example
function createMainImageContainer($img, $destination) {
var $container, $table, $menu;
$container = $('<div id="image">');
$table = $('<table class="imageTable"><tr><td align="center"></td></td></table>').appendTo($container);
$menu = $('<div>').attr('id', "removeMainImage")
.addClass("button buttonImage")
.text("Ta bort")
.click(function () { removeMainImage($container, $destination); })
.appendTo($container);
$table.find('td').append($img.clone());
return $container;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment