JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
<h1><a href="https://jplist.org/documentation/controls/select-sort">jPList Select Sort Control</a></h1>
<div class="buttons">
<!-- select sort control -->
<select
data-jplist-control="select-sort"
data-group="data-group-1"
data-name="name1">
<option
value="0"
data-path="default">Sort by</option>
<option
value="1"
data-path=".name"
data-order="asc"
data-type="text"
selected>Name A-Z</option>
<option
value="2"
data-path=".name"
data-order="desc"
data-type="text">Name Z-A</option>
</select>
</div>
<!-- content to filter -->
<div data-jplist-group="data-group-1">
<!-- item -->
<div data-jplist-item>
<div class="name">Cecilia Hanson</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Alejandro Miles</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Andy Harris</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Deanna Castillo</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Danny Richards</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Allie Moss</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Stefanie Reyes</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Jakob Flores</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Christine Richards</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Miranda Hill</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Meghan Williamson</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Kierra Long</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Tara Park</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Anthony Reyes</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Malik Becker</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Daisy Hunter</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Arianna Fuller</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Stephan Wang</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Cristal Wallace</div>
</div>
<!-- item -->
<div data-jplist-item>
<div class="name">Alyson Chandler</div>
</div>
</div>
/**
* demo styles
*/
html, body{
background: #efefef;
box-sizing: border-box;
padding: 10px;
}
h1{
text-align: center;
margin: 0 0 10px 0;
padding: 0;
font-size: 22px;
color: #212529;
}
a{
color: #212529;
}
a:hover{
text-decoration: none;
}
[data-jplist-group]{
display: flex;
font-size: 16px;
flex-wrap: nowrap;
flex-direction: column;
align-items: center;
width: 100%;
box-sizing: border-box;
}
[data-jplist-item]{
border-bottom: 1px dotted #ccc;
width: 100%;
text-align: center;
padding: 10px 0;
box-sizing: border-box;
}
.buttons{
display: flex;
justify-content: center;
align-items: center;
margin: 20px 0;
}
jplist.init();
Also see: Tab Triggers