html - jQuery smooth transition on .removeClass / .addClass atr -


I am doing an "image gallery" with CSS and jquery and I want to switch between images by clicking on the button I am I removed it / class with it because it is easy and I know that I can do it with "animate" but it is very complicated for me.

I do not want to use pre-built sliders, therefore, if you can help me, I will confirm it!

JSField:

I like that something like this might be possible: ). addClass ("Some Square", 1000); / * I mean, 1000 * /

If I understand you correctly, You want an optional solution to make smooth changes while switching between images, both the elements will be applied using the full position on each other and just fadeIn and fadeOut Functions that take milliseconds as optional parameters.

Simplified sample will be something like this.

HTML:

  & lt; Ul & gt; & Lt; li id ​​= "element1" & gt; A & lt; / li & gt; & Lt; li id ​​= "element2" class = "hide" & gt; B & lt; / li & gt; & Lt; / Ul & gt;   

CSS:

  ul {Location: Relative; Height: 200 pixels; } Li {Status: Absolute; }. Skip ("hide") $ ("hide") $ {("hide") $ {"# element2"). removeClass ("hide")   

You can

  $ ("# element1"). fadeOut (1000) $ ("# element2"). fadeIn (1000)   

View this concept with your sample here:

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -