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: 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 Simplified sample will be something like this. HTML: CSS: You can View this concept with your sample here: fadeIn and
fadeOut Functions that take milliseconds as optional parameters.
& 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;
ul {Location: Relative; Height: 200 pixels; } Li {Status: Absolute; }. Skip ("hide") $ ("hide") $ {("hide") $ {"# element2"). removeClass ("hide")
$ ("# element1"). fadeOut (1000) $ ("# element2"). fadeIn (1000)
Comments
Post a Comment