Why can't I animate to 100% width in Jquery? -


I was trying to answer a question for someone else and I ran from jquery to strange / unexpected behavior . The width specified in rule 18 in JSFiddle, if I change it to 100% (for example, the method of 200px, then change it to 100%, see what I'm talking about). I should be 100% so that the button automatically fits the text.

.

The question is: "How do I work in animation 100% width ???"

Jquery code:

  $ (document) .ready ($ ("(ScrollDownArrow") ($ ("(ScrollDownArrow") ($ ("(ScrollDownArrow"). Haclass ("Clicked")) {$ (".im signal image") .Fedote (500) ; $ (". Indicator"). Delay (500) / * Wait Fadeout * /. At Atom ({width: 200} / * Unfortunately the width does not seem to work: 100% So I assumed a px: ( * /, 1000). Permission ({Opacity: 1}, 500); $ (". ScrollDownArrow"). RemoveClass ("clicked");} and {$ (". Sign.") ({Width: 0}, 1000); $ ("signal image"), delay (1500). Adding to "False" (500); $ ("scrolldown arrow"). AddClass ("clicked");}}); // and click}; // and ready  
< P>

The problem is that you have the a inside the div element (. Ht ).

"100%" is animating for jQuery, the element's parent width (i.e. the width of a ).

Anchor element, by default, has inline elements (i.e. display property in CSS initially inline ). As a result, the anchor width is auto .

To fix this, set the anchor width to 100% or set its display property to block .


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -