Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

toggle text jquery

$("button").click(function(){
  $(this).text($(this).text() == 'Show' ? 'Close' : 'Show');
});
Comment

jquery toggle text on click

$(function(){
   $(".pushme").click(function () {
      $(this).text(function(i, text){
          return text === "PUSH ME" ? "DON'T PUSH ME" : "PUSH ME";
      })
   });
})
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript remove all but numbers 
Javascript :: reload page javascript 
Javascript :: jquery ajax cors 
Javascript :: Javascript get current year 
Javascript :: Javascript run code after page load 
Javascript :: javascript string to double 
Javascript :: table row count in jquery 
Javascript :: electron remove default menu 
Javascript :: jspdf cdn 
Javascript :: jquery checkbox change event 
Javascript :: jquery chrome console 
Javascript :: yup validate password confirmation 
Javascript :: ruby read json file 
Javascript :: javascript get current url 
Javascript :: new MiniCssExtractPlugin({ ^ TypeError: MiniCssExtractPlugin is not a constructor 
Javascript :: only numeric values are allow in input jquery 
Javascript :: how to restart elasticsearch node 
Javascript :: number of properties in object javascript 
Javascript :: dynamics crm javascript set field visible 
Javascript :: fetch post json 
Javascript :: remove localstorage 
Javascript :: javascript remove extension from filename 
Javascript :: js remove readonly attribute 
Javascript :: jquery get the length of input text 
Javascript :: 1line uuid 
Javascript :: is advanced functions harder than calculus 
Javascript :: fetch x-www-form-urlencoded 
Javascript :: react js installation 
Javascript :: javascript regex french phone number 
Javascript :: foreach document.getelementsbyclassname 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =