From 3534e706c32d8892f3499722fae61c1f3bad607f Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 16 Dec 2013 12:27:38 -0500 Subject: remove frame --- shader-gif.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'shader-gif.html') diff --git a/shader-gif.html b/shader-gif.html index f99aaba..e5c4884 100644 --- a/shader-gif.html +++ b/shader-gif.html @@ -6,10 +6,10 @@ #url { width: 100px; } #width,#height,#frames,#delay {width: 30px; } #shader { width: 400px; height: 247px; font-family: fixed; } -#frames { width: 400px; height: 100px; } +#frames { width: 450px; height: 100px; } #controls { width: 450px; } -#frames div { padding: 1px; } -#frames .remove { position: absolute; top: 5px; right: 5px; color: #f00; } +#frames div { padding: 1px; position: relative; } +#frames .remove { position: absolute; top: 5px; right: 5px; color: #f00; padding: 3px; border: 0;background: white; font-size: 10px; line-height: 10px; } div { float: left; padding: 10px;} @@ -64,6 +64,7 @@ function init(){ start: function(){ dragging = true }, stop: function(){ dragging = false } }); + $(document).on("click","#frames .remove",remove_frame) $("#frames").disableSelection(); demo('#first') load() @@ -153,10 +154,11 @@ function add_frame(){ $("#frames").append($el) } function remove_frame(){ + $(this).closest("div").remove() }