Home >Web Front-end >JS Tutorial >jquery original pop-up layer folding effect Click fold to pop up a layer_jquery
jquery original pop-up layer folding effect Click fold to pop up a layer_jquery
WBOYOriginal
2016-05-16 16:55:411147browse
The pop-up layer effect is used on many websites. Today I will sort out a small effect used in recent projects. Click fold to pop up a layer for users to fill in information. The pop-up layer code is dynamically created by jq. Everyone's writing method is different and their needs are also different. Just make all the choices that suit you.
'; //layer_item end $('body').append(layer_bg); $('body').append(layer); var winW = $(window).width(); var winH = $(window).height(); var objH = $('.layer_item').height(); var objW = $('.layer_item').width(); $('.layer_item').css({ 'height': 0 }); $('.bm').click(function () { $('.layer_bg').css('opacity',0.7).fadeIn(); $('.layer_item').animate({ 'height': objH, 'marginTop': -objH / 2 },500); }); $('.layer_title a').on('click', function () { $('.layer_item').animate({ 'height': 0, 'marginTop': 0 }, 200, function () { $('.layer_bg').fadeOut(); }); }); });
效果图:
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn