Skip to content

Instantly share code, notes, and snippets.

@kshoufer
Last active August 29, 2015 14:06
Show Gist options
  • Save kshoufer/a09520641a943989b662 to your computer and use it in GitHub Desktop.
Save kshoufer/a09520641a943989b662 to your computer and use it in GitHub Desktop.
A Pen by Ken Shoufer.
<ul id="list1">
<li><img id="image1" src="http://placehold.it/150x150/ff0000/fff&text=1"></li>
<li><img id="image2" src="http://placehold.it/150x150/00ff00/fff&text=2"></li>
<li><img id="image3" src="http://placehold.it/150x150/0000ff/fff&text=3"></li>
<li><img id="image4" src="http://placehold.it/150x150/555/fff&text=4"></li>
</ul>
var parent = document.querySelector('#list1');
var child = parent.childNodes;
parent.removeChild(child[5]);
ul {
display: inline-block;
}
ul li {
list-style: none;
float: left;
padding: 10px;
}
Working with the DOM and Javascript - Example3
----------------------------------------------
A [Pen](http://codepen.io/kshoufer/pen/cuhaK) by [Ken Shoufer](http://codepen.io/kshoufer) on [CodePen](http://codepen.io/).
[License](http://codepen.io/kshoufer/pen/cuhaK/license).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment