Created
September 8, 2011 09:38
-
-
Save eldewall/1203030 to your computer and use it in GitHub Desktop.
MenuDiv example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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