diff --git a/index.html b/index.html index 47f39d4..9ffc409 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,43 @@ - -

todo!

- \ No newline at end of file + + + + TO-DO LIST + + + + + + + + + + + +
+ +

TO-DO!!

+ +
+
+
+ +
+
+ +
+
+
+ +
+

To Be Done:

+
+ +
+

Completed:

+
+ +
+ + + + diff --git a/main.css b/main.css index cdda92f..3fe5850 100644 --- a/main.css +++ b/main.css @@ -1,3 +1,51 @@ -body { - padding: 20px; -} \ No newline at end of file +h2 { + color : white; + font-family: nexa; +} + +h3{ + font-family: avenier; +} + +body{ + background-color: #3E3E3E; + font-family: ebrima; +} + +.text-field{ + margin-top: 50px; + margin-bottom: 50px; +} + +.heading{ + background-color: #F4722B; +} + +.well{ + background-color: #B3A78C; +} + +.l_property{ + background-color: #CCCCCC; + padding: 1px; +} + +.col-xs-1{ + text-align: center; + margin-top: 10px; +} + +#Add{ + background-color: #3F72AF; + color: white; +} + +#removeBtn{ + margin-top: 3px; + +} + +#done > div > div > h4 { + text-decoration: line-through; +} + diff --git a/main.js b/main.js index c80ec08..49be986 100644 --- a/main.js +++ b/main.js @@ -1 +1,40 @@ -console.log('test'); \ No newline at end of file +$(document).ready(function(){ + + //to add elements in to be done list + $("#Add").click(function(e){ + if($("#taskEntered").val() === ""){//checking empty or not + alert("Error : No Task Entered"); + return false; + } + else{ + var taskAdded = $("#taskEntered").val();//taking input task from textbox + $("#to-be-done").append("
" + "
" + "" + "
" + "
" + "

" + taskAdded + "

" + "
" + "
" + "" + "
"); + $("#addForm")[0].reset();//to reset textbox + e.preventDefault();//to prevent form reset + } + }); + + //Remove element from list + $(document).on('click', '#removeBtn',function(){ + var taskDel = $(this).parent().parent(); + $(taskDel).remove(); + }); + + //moving checked task to 'done' list + $("#to-be-done").on('click', '.check_todo' ,function(){ + if($(this).is(':checked')){ + var parentEle =$(this).parent().parent(); + $(parentEle).appendTo("#done"); + } + } ); + + //moving uncheck task to 'to-be-done' list + $("#done").on('click', '.check_todo' ,function(){ + if(!($(this).is(':checked'))){ + var parentEle =$(this).parent().parent(); + $(parentEle).appendTo("#to-be-done"); + } + } ); + + +});