Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

view source toggle

  • Loading branch information...
commit 8b85d8254e2453c4fb6b38d6a3979753fd24a956 1 parent 4dc14da
@n8han n8han authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 widget.html
View
7 widget.html
@@ -1,8 +1,8 @@
<html>
<head>
<style>
+ textarea.source { display: none; }
textarea { width: 40em; height: 20em };
-
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="template.js"></script>
@@ -77,6 +77,10 @@
return false;
});
};
+ listing.find("a.view-source").click(function() {
+ listing.find("textarea.source").slideToggle();
+ return false;
+ });
listing.find("textarea.source").keyup(update_listing).keyup();
});
}
@@ -131,6 +135,7 @@
<h3 class="name"><#= name #></h3>
<div class="description" />
<form>
+ <a class="view-source" href="#">View &amp; Edit Source</a>
<div><textarea class="source"><#= source #></textarea></div>
<div class="params" />
<div><input class="create" value="Widgetize" type="submit" /></div>
Please sign in to comment.
Something went wrong with that request. Please try again.