jquery - FadeTo not properly working -


I do not have to work as a problem of my little code because I want it to be the first code I'll post.

  $ (function () {$ (document) .ready (function () {if ($ ( "#skillelementwithme") .hasClass ( "skillelement_collapsed")) {$ ( "#skillelementwithme ") Kklik (function () {$ (" #skillelementvithme ") Ktoggleclass (" Skillelement_aktiv_vithame ", 500); $ (" #skillelementvitheu ") Kfadto (1000, 0);});} else if ((" #skillelementvithme ") Khsclass (" Skillelement_aktiv_vithame ")) {$ (" #skillelementvithme ") Kklik (function () {$ (" #skillelementvithme ") Ktoggleclass (" Skillelement_kollpsed ", 500); $ (" #skillelementvitheu " ) .FadeTo (1000, 1);})}}})});  

Now while fadetotransparent work perfectly fine, I can not get Fedeto back to become opaque "skillelementwithyou" class. Perhaps I understood something completely wrong with these actions. I hope you guys can help me. Maybe your just something is so small that im hate me.

"text" itemprop = "text">

  $ (function () {$ ("# skillelementwithme ") click (function () {$ (" # skillelementwithme ") .toggleClass (" skillelement_active_withme skillelement_collapsed ") ;. $ (" # skillelementwithyou ") fadeToggle () ;.});}); Some of your mistakes:    

$ (function () {

and $ (Document) .ready (function () { is basically the same so that you can get rid of one.

("#skillelementwithme") is an invalid selector (You are missing the jQuery object reference $ .)

Wrapping click () inside if the status. JS code will be read if on time, true returned part of the .click () function, while the other ( incorrect ) Will Ia and will never reach. Click on the second way ( if or click handler to]

.toggleClass ( "skillelement_collapsed" , 500); Toggle class does not accept time logic. This animation is not.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -