Archive: Namaste PHP AMQP framework v1.0 (2017-2020)
952 days continuous production uptime, 40k+ tp/s single node. Original corpo Bitbucket history not included — clean archive commit.
This commit is contained in:
50
html/js/modules (optional)/card-reveal.js
Normal file
50
html/js/modules (optional)/card-reveal.js
Normal file
@@ -0,0 +1,50 @@
|
||||
/* CARD REVEAL */
|
||||
|
||||
(function ($) {
|
||||
$(document).ready(function () {
|
||||
|
||||
$(document).on('click.card', '.card', function (e) {
|
||||
if ($(this).find('.card-reveal').length) {
|
||||
if ($(e.target).is($('.card-reveal .card-title')) || $(e.target).is($('.card-reveal .card-title i'))) {
|
||||
// Make Reveal animate down and display none
|
||||
$(this).find('.card-reveal').velocity({
|
||||
translateY: 0
|
||||
}, {
|
||||
duration: 225,
|
||||
queue: false,
|
||||
easing: 'easeInOutQuad',
|
||||
complete: function () {
|
||||
$(this).css({
|
||||
display: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if ($(e.target).is($('.card .activator')) ||
|
||||
$(e.target).is($('.card .activator i'))) {
|
||||
$(this).find('.card-reveal').css({
|
||||
display: 'block'
|
||||
}).velocity("stop", false).velocity({
|
||||
translateY: '-100%'
|
||||
}, {
|
||||
duration: 300,
|
||||
queue: false,
|
||||
easing: 'easeInOutQuad'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
//Social reveal
|
||||
$(document).ready(function ($) {
|
||||
|
||||
$('.card-share > a').on('click', function (e) {
|
||||
e.preventDefault() // prevent default action - hash doesn't appear in url
|
||||
$(this).parent().find('div').toggleClass('social-reveal-active');
|
||||
$(this).toggleClass('share-expanded');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user