shorthand in jquery -


मेरे पास ये jquery कोड हैं:

  $ (document) .ready (function () $ $ ("# Masthead ul li")। माउसओवर (फ़ंक्शन () {$ ("# masthead ul li")। RemoveClass ("cr"); $ (यह) .toggleClass ("cr");});} ); $ (दस्तावेज़) .ready (फ़ंक्शन () {$ ("# intUl li")। माउसओवर (फ़ंक्शन () {$ ("# intUl li")। RemoveClass ("cr"); $ (this) .toggleClass (" सीआर ");});});  

क्या हम दो समान jquery कोड के लिए आशुलिपि लिख सकते हैं? अग्रिम धन्यवाद

इसे आज़माएं:

  $ (दस्तावेज़)। तैयार (कार्य () ($ ("# masthead ul li, #intUl li")। माउसओवर (फ़ंक्शन () {$ (this) .removeClass ("cr"); $ (this) .toggleClass ("cr"); });});  

Comments

Popular posts from this blog

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

tsql - Correct sql/hql query (aggregate in where clause) -