php - how to change button into text format when on click the button -


is possible when on click button change text , not button.

ex:

i have invite button individual user. need when on click invite button, button text need not change instead button change text.

"invite" button format change "pending request" text format along "cancel" button when on click button.

hope helps, fiddle

if want learn more. read more jquery.

html

<input id="invite" type="button" value="invite" /> <span id="pending">pending</span> <input id="cancel" type="button" value="cancel" /> 

script

$('#pending').hide(); $('#cancel').hide();  $('#invite').on('click', function () {     $(this).hide('fast');     $('#pending').show('fast');     $('#cancel').show('fast'); });  $('#cancel').on('click', function () {     $(this).hide('fast');     $('#pending').hide('fast');     $('#invite').show('fast'); }); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -