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

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -