Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions css/component.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
text-align: center;
}

.elasticstack li a:hover{
color: #000;
}

.elasticstack li {
position: absolute;
z-index: 1;
Expand Down
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
<h1>Elastic Stack <span>Elastic dragging interaction <span>Idea from this <a href="http://dribbble.com/shots/1221770-PassPic">Dribbble shot by CreativeDash</a></span></span></h1>
</header>
<ul id="elasticstack" class="elasticstack">
<li><img src="img/1.jpg" alt="01"/><h5>Saudade</h5></li>
<li><img src="img/2.jpg" alt="02"/><h5>Tuqburni</h5></li>
<li><img src="img/3.jpg" alt="03"/><h5>Retrouvailles</h5></li>
<li><img src="img/4.jpg" alt="04"/><h5>Onsra</h5></li>
<li><img src="img/5.jpg" alt="05"/><h5>Mamihlapinatapai</h5></li>
<li><img src="img/6.jpg" alt="06"/><h5>Koi No Yokan</h5></li>
<li><img src="img/1.jpg" alt="01"/><h5><a href="https://www.google.com.ua">Google</a></h5></li>
<li><img src="img/2.jpg" alt="02"/><h5><a href="https://www.youtube.com/">Youtube</a></h5></li>
<li><img src="img/3.jpg" alt="03"/><h5><a href="https://github.com/">Github</a></h5></li>
<li><img src="img/4.jpg" alt="04"/><h5><a href="https://www.linkedin.com">LinkedIn</a></h5></li>
<li><img src="img/5.jpg" alt="05"/><h5><a href="https://bitbucket.org/">BitBucket</a></h5></li>
<li><img src="img/6.jpg" alt="06"/><h5><a href="https://nodejs.org/">Node.js</a></h5></li>
</ul>
<section class="related">
<p>If you enjoyed this, you might also like:</p>
Expand Down
6 changes: 6 additions & 0 deletions js/elastiStack.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@
};

ElastiStack.prototype._onDragStart = function( instance, event, pointer ) {

if(event.target.tagName === 'A' && event.target.href){
window.location.href = event.target.href;
}

// remove transition classes if any
var item2 = this._secondItem(), item3 = this._thirdItem();

Expand Down Expand Up @@ -263,6 +268,7 @@
};

ElastiStack.prototype._initDragg = function() {
//todo change lib. Draggabilly prevent following a link from mobile device
this.draggie = new Draggabilly( this.items[ this.current ] );
};

Expand Down