text - Change label based on element visibility (jQuery) -


HTML:

  & lt; a href = "#" & gt; अगला तत्व दिखाएँ & lt; / एक & gt; & Lt; div & gt; सामग्री & lt; / div & gt;  

jQuery:

  $ ('a')। टॉगल (फ़ंक्शन () {$ (this) .next ()। Show ();} , फ़ंक्शन () {$ (यह) .next ()। Hide ();});  

मैं उपर्युक्त jQuery को कैसे बदलूं, जिससे तत्व दिखता है जब "छिपाएँ" के लिंक में "दिखाएं" को भी बदलता है?

धन्यवाद!

परीक्षण नहीं किया गया है ...

  $ ('a' ) .टागाल (फ़ंक्शन () {$ (यह) .next ()। शो (); $ (यह)। Html ("अगले तत्व छिपाएं");}, फ़ंक्शन () {$ (this) .next () छिपाना (), $ (यह)। HTML ("अगले तत्व दिखाएं");});  

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 -