javascript - How Fade-in and fade-out transitions between grid/list views? -
This content is meant to switch between grid and list views to display. How to add feed-in and feed-out changes or opacity while switching between grid and list views. Here's the : BSL to JSL: I tried : when I and This grid view has only feed-in, then the inventory view is invisible while invisible. See this belly : Please tell how Changes between grid / list while fade-in-the-go and fade-out switching? Note : Please do not change the HTML, do not provide any other HTML / plug-in link I have updated some code. I believe this is what you want .. Updated code: http://jsfiddle.net/9B4Lp/3/ (demo without transition)
jQuery (document) .ready (function () {var $ box = jQuery (".post") , $ Bar = jQuery ("a.bar_view"); $ dat $ JQuery ("a.dat_view"); $ dat.click (function () {$ box.removeClass ("bar"); jQuery (this) .addClass $ Bar.removeClass ("active"); JQuery.cookie ("dat_style", 0); return false}); $ bar.click (function () {$ box.addClass ("bar") ; JQuery (this) .addClass ("active"); $ dat .removeClass ("active"); jQuery.cookie ("dat_style", 1); return false}}, if (jQuery.cookie ("dat_style") = = 0) {$ box.removeClass ("bar"); $ Dat.addClass ("active")} and {$ box.addClass ("bar"); $ bar.addClass ("Active Y}}});
.fadeOut (1000) Add to the
$ box .removeClass ("bar"). FadeOut (1000);
. FadeIn (1000) here
$ box.addClass ("bar") .Fed In (1000);
http://jsfiddle.net/Qba5n/ (problem demo)
$ box.fadeOut (1000, function () {$ Box RemoveClass ("bar"). FadeIn () // update}); $ Box.fadeOut (1000, function) ($ box.addClass ("bar"). FadeIn () // updated});
Comments
Post a Comment