Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to change the text using jquery on click

$(document).ready(function () {
    $("#fold").click(function () {
        $("#fold_p").fadeOut(function () {
            $("#fold_p").text(($("#fold_p").text() == 'Fold it') ? 'Expand it' : 'Fold it').fadeIn();
        })
    })
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: electron mass to amu 
Javascript :: return empty new promise 
Javascript :: js sting first letter 
Javascript :: flatlist horizontal 
Javascript :: chartjs Uncaught ReferenceError: Utils is not defined 
Javascript :: route pass props to component 
Javascript :: set property dom javascrpt 
Javascript :: how to instance in a node with code godot 
Javascript :: render react in blaze 
Javascript :: js validate phone number 
Javascript :: settimeout vs requestanimationframe 
Javascript :: font awesome react native icons 
Javascript :: check if var is NaN 
Javascript :: convert number to word js 
Javascript :: .split is not a function 
Javascript :: javascript copy image to clipboard 
Javascript :: simple javascript code 
Javascript :: sortby vue 
Javascript :: filter javascript 
Javascript :: javascript list include 
Javascript :: ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @agm/core@1.1.0 npm ERR! Found: @angular/common@10.0.14 
Javascript :: allow only numbers and special characters in textbox using javascript 
Javascript :: javascript sort multidimensional array 
Javascript :: firestore set a document 
Javascript :: js get last array element 
Javascript :: correct json type 
Javascript :: javascript break for loop 
Javascript :: bs modal service close 
Javascript :: map javascript index 
Javascript :: merge objects javascript 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =