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 : http://jsfiddle.net/9B4Lp/3/ (demo without transition)

BSL to JSL:

  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}}});   

I tried : when I

.fadeOut (1000) Add to the $ box .removeClass ("bar"). FadeOut (1000);

and . FadeIn (1000) here $ box.addClass ("bar") .Fed In (1000);

This grid view has only feed-in, then the inventory view is invisible while invisible.

See this belly : http://jsfiddle.net/Qba5n/ (problem demo)

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:

  $ box.fadeOut (1000, function () {$ Box RemoveClass ("bar"). FadeIn () // update}); $ Box.fadeOut (1000, function) ($ box.addClass ("bar"). FadeIn () // updated});    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -