jquery - Hide submit button and fields on click -
users input data , submit.
how put submitted data in cell of table , hide fields on submit button click
<td> <input type="text" placeholder="module code" class="event" /> <input type="text" placeholder="module" class="event" /> <input type="text" placeholder="room" class="event" /> <input id="submit1" type="submit" value="submit"/> here http://jsfiddle.net/fjtr8/
thanks help
do mean http://jsfiddle.net/fjtr8/7/
$('#submit1').parent('td').css('background-color','red') $('#submit1').click(function() { var module_code = $('#module_code').val() var module = $("#module").val(); var room = $("#room").val(); var td ="<td class='"+module_code+"'><div>"+module_code+"</div><div>"+module+"</div><div>"+room+"</div></td><td>" $(this).parent('td').html(td) });
Comments
Post a Comment