Answers for "toggle value jquery"

3

toggle text jquery

$("button").click(function(){
  $(this).text($(this).text() == 'Show' ? 'Close' : 'Show');
});
Posted by: Guest on January-21-2021
1

jquery toggle text on click

$(function(){
   $(".pushme").click(function () {
      $(this).text(function(i, text){
          return text === "PUSH ME" ? "DON'T PUSH ME" : "PUSH ME";
      })
   });
})
Posted by: Guest on June-02-2020
6

jquery toggle show hide

$( "#clickme" ).click(function() {
  $( "#book" ).toggle( "slow", function() {
    // Animation complete.
  });
});
Posted by: Guest on May-11-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language