Commit ad4e54d5 by Bence Dányi

webui: replace jQuery animations with CSS transitions

parent 92c2d59a
var toggleDetails; var toggleDetails;
$(function() { $(function() {
toggleDetails = cloud.throttle(function() { toggleDetails = function() {
if ($(this).parent('.entry').hasClass('opened')) { if ($(this).parent('.entry').hasClass('opened')) {
$(this).parent('.entry').removeClass('opened'); $(this).parent('.entry').removeClass('opened');
$(this).next('.details').slideUp(700); $(this).next('.details').css('height', '0px');
} else { } else {
$(this).parent('.entry').addClass('opened'); $(this).parent('.entry').addClass('opened');
$(this).next('.details').slideDown(700); $(this).next('.details').css('height',
$(this).next('.details').find('.details-container')[0].offsetHeight+15+'px');
} }
}) }
$('a[href=#]').click(function(e) { $('a[href=#]').click(function(e) {
e.preventDefault(); e.preventDefault();
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment