JavaScript Newline on pull-right (Bootstrap)

I'm trying to make a to do-list using Bootstrap and Javascript, and every item on the list consists of a text which is user-input and three clickable glyphicons (edit, finished, remove), on which i use .pull-right to make them appear on the right of the list-item.

This works well when adding a new element altogether, but I also want to make the elements editable, and upon saving an edit the glyphicons all of a sudden appear one line below the text (and outside of the box that is the list-item for that matter).

http://jsfiddle.net/k3uLutbb/

In short, my question is: How do i get the text and the glyphicons to stay horizontally aligned when saving an edit?

$("#addText").on("click", function() {
var inText = $("#inText").val();
if(inText !== "") {
  $("#inText").val("");
  var theText = "<li class='list-group-item'>"+inText+"<span class='glyphicon glyphicon-remove pull-right' aria-hidden='true'></span><div class='glyphicon glyphicon-ok pull-right' id='1' aria-hidden='true'></div><span class='glyphicon glyphicon-pencil pull-right' aria-hidden='true'></span></li>";
  $(".list-group").append($(theText));
}

^ This is for adding a new list-item, alignment works fine.

$("ul").on("click", "#updateText", function() {
var inText = $("#newText").val());
console.log("hihi");
if(inText !== "") {
  var theText = inText+"<span class='glyphicon glyphicon-remove pull-right' aria-hidden='true'></span><span class='glyphicon glyphicon-ok pull-right' aria-hidden='true'></span><span class='glyphicon glyphicon-pencil pull-right' aria-hidden='true'></span>";
  $(this).closest("li").html(theText);
}

^ This is for saving an edit, it's here the alignment gets all messed up even though I've copied the html from the other function.

I've also tried using float: right; instead of .pull-right, but to no avail.

Answer:1

The express framework comes with the express functions express.json() and express.urlencoded(). We have the body-parser library, which appears to do the same functions. My question is, does body-...

The express framework comes with the express functions express.json() and express.urlencoded(). We have the body-parser library, which appears to do the same functions. My question is, does body-...

  1. body parser json limit
  2. body parser json express
  3. body parser json
  4. body-parser json example
  5. body parser json error
  6. body parser json nodejs
  7. body parser json node
  8. body parser json options
  9. body-parser json validation
  10. body parser json request
  11. body-parser json text
  12. body-parser json problem
  13. body-parser json custom
  14. body-parser-json npm
  15. body parse json
  16. body( parse_json ) d results
  17. body-parser package.json
  18. express body parser json not working
  19. express body parser json example
  20. koa body parser json

Below is my sort function but I want to display the ones with a code to be at the top. I want to sort my array of objects by code, then by description. Right now, the items without a code is being ...

Below is my sort function but I want to display the ones with a code to be at the top. I want to sort my array of objects by code, then by description. Right now, the items without a code is being ...

  1. sort array object javascript
  2. sort array object javascript by value
  3. sort array object by property javascript
  4. sort array object alphabetically javascript
  5. sort array object php
  6. sort array object by key
  7. sort array object in java
  8. sort array object typescript
  9. sort array object lodash
  10. sort array object javascript by date
  11. sort array object in js
  12. sort array object by name
  13. sort array object python
  14. sort array object angular
  15. sort array object alphabetically java

In a swig file I want to see all available properties that it is receiving. Is there a way to access it? Or can I only access its properties? .js res.render('list.swig', result); list.swig {{ ...

In a swig file I want to see all available properties that it is receiving. Is there a way to access it? Or can I only access its properties? .js res.render('list.swig', result); list.swig {{ ...

I am trying to match a regex with some data in a file, the match function however returns null even when the match clearly exists in the data. I have tried same data and regex on RegExr and it shows ...

I am trying to match a regex with some data in a file, the match function however returns null even when the match clearly exists in the data. I have tried same data and regex on RegExr and it shows ...

  1. string match function excel
  2. string match function in javascript
  3. string match function in java
  4. string match function in python
  5. string match function in sql
  6. string match function in php
  7. string match function
  8. string match function in c
  9. string match function in r
  10. string match function in jquery
  11. string match function vba
  12. string match function tcl
  13. string match function ruby
  14. js string match function
  15. partial string match function in excel
  16. typescript string match function
  17. lua string match function
  18. tableau string match function
  19. mysql string match function
  20. string-match emacs function