Angular: Empty Fiddle

http://angularjs.org/

by 1eddy87

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<a>foo</a>
<br>
<a>bar</a>
<br>
<a>baz</a>

CSS

i.grey {
  background: grey
}

i {
  width: 10px;
  height: 10px;
  display: inline-block;
}

i.yellow {
  background: yellow
}

JavaScript

$('a').click(function() {
  if (!$(this).hasClass('have-icon')) {
    $(this).addClass('have-icon');
    $('<a href="#"><i class="glyphicon glyphicon-info-sign" style="color: #ccc;"></i></a>').insertBefore($(this));
  }
});