"Simple Comment Block"
Bootstrap 3.2.0 Snippet by JGoodwillieV

<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="col-lg-4 col-sm-6 text-center"> <div class="well"> <h4>What is on your mind?</h4> <div class="input-group"> <input type="text" id="userComment" class="form-control input-sm chat-input" placeholder="Write your message here..." /> <span class="input-group-btn" onclick="addComment()"> <a href="#" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-comment"></span> Add Comment</a> </span> </div> <hr data-brackets-id="12673"> <ul data-brackets-id="12674" id="sortable" class="list-unstyled ui-sortable"> <strong class="pull-left primary-font">James</strong> <small class="pull-right text-muted"> <span class="glyphicon glyphicon-time"></span>7 mins ago</small> </br> <li class="ui-state-default">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </li> </br> <strong class="pull-left primary-font">Taylor</strong> <small class="pull-right text-muted"> <span class="glyphicon glyphicon-time"></span>14 mins ago</small> </br> <li class="ui-state-default">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</li> </ul> </div> </div>
.container { padding: 25px; position: fixed; left: 25%; } li.ui-state-default{ background:#fff0; border:none; border-bottom:1px solid #ddd; text-align: left; padding-bottom: 10px; } li.ui-state-default:last-child{ border-bottom:none; } @import url(http://fonts.googleapis.com/css?family=Roboto:400); body { background-color:#fff; -webkit-font-smoothing: antialiased; font: normal 14px Roboto,arial,sans-serif; } .btn,.form-control,.well { border-radius:1px; box-shadow:0 0 0; } .form-control { border-color:#d7d7d7; } .btn-primary { border-color:transparent; } .btn-primary, .list-group-item.active:focus { background-color:#4285f4; } .btn-plus { background-color:#ffffff; border-width:1px; border-color:#dddddd; box-shadow:1px 1px 0 #999999; border-radius:3px;color:#666666; text-shadow:0 0 1px #bbbbbb; } .well,.panel { border-color:#d2d2d2; box-shadow:0 1px 0 #cfcfcf; border-radius:3px; } hr { border-color:#ececec; } button { outline: 0; } .btn span{ color:#666666; } .list-group-item:first-child,.list-group-item:last-child { border-radius:0; } h3 { border:0 solid #efefef; border-bottom-width:1px; padding-bottom:10px; }
function addComment(){ var userComment = document.getElementById("userComment").value; document.getElementById("ui-state-default").innerHTML = userComment; }

Related: See More


Questions / Comments:

hola

yorbis () - 7 years ago - Reply 0


nbbbb

sadas () - 7 years ago - Reply 0


aaaaaaaaaaa

test1 () - 8 years ago - Reply 0


Hello Dear

sggg () - 8 years ago - Reply 0


sdfsfsd

sdadsad () - 8 years ago - Reply 0


sddsg

gg () - 8 years ago - Reply 0


thank u

dsffsdf

Anand VL () - 8 years ago - Reply 0


is there a code for the landing page - when the viewer clicks the 'add' button? i.e it links to which page?

sillentee () - 9 years ago - Reply 0


its just show the same thing....but i want chat for my website...how it will work when it is connected to database....

priyankavanga () - 9 years ago - Reply 0


you must code it! this is only a "snippet" for bootstrap!
you can make a chat with node.js or php and mysql with simple ajax polling
or with websockets and so on..

mike () - 9 years ago - Reply 0