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

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -