Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $( document ).ready(function () {
- var clone = (function () {
- var cloneIndex = 0;
- var template = $('#categoryTemplate').text();
- return function () {
- return template.replace(/ID/g, ++cloneIndex);
- }
- })();
- //Start off with 1 category.
- categories.append(clone());
- $(document).on('change', 'select', function () {
- var string= '';
- $.each($('select option:selected'), function () {
- string += $(this).val();
- });
- document.getElementById("MainContent_Label1").innerHTML = string;
- });
- $(document).on("click", 'button.add', function () {
- categories.append(clone());
- });
- });
Add Comment
Please, Sign In to add comment