Depends on what type of button you are using
<input type='button' value='Add' id='btnAddProfile'> $("#btnAddProfile").attr('value', 'Save'); //versions older than 1.6 <input type='button' value='Add' id='btnAddProfile'> $("#btnAddProfile").prop('value', 'Save'); //versions newer than 1.6 <!-- Different button types--> <button id='btnAddProfile' type='button'>Add</button> $("#btnAddProfile").html('Save');
Your button could also be a link. You’ll need to post some HTML for a more specific answer.
EDIT : These will work assuming you’ve wrapped it in a .click()
call, of course
EDIT 2 : Newer jQuery versions (from > 1.6) use .prop
rather than .attr
EDIT 3 : If you’re using jQuery UI, you need to use DaveUK’s method (below) of adjusting the text property
Related Posts:
- jQuery dialog popup
- jQueryUI dialog width
- How to use radio on change event?
- Form Submit jQuery does not work
- Slide right to left?
- Check if user is logged in using JQuery
- How to save the state of a drag and drop jQuery UI Sortables front end layout editor?
- jQuery UI Datepicker not working
- Custom function to rearrange attachments when creating posts – Almost there
- possible to make sections in theme customizer sortable and saveable at publish button clicked?
- Enqueuing jQuery in plug-ins
- How do I get my page to load the jQuery UI Effects library?
- Override default jquery ui library with newer version
- How to enable the content editor as a droppable target with jQuery-ui?
- Automatic jQuery accordion from header tags
- Jquery not showing in homepage
- Format numeric symbols in titles
- jQuery.accordion isn’t a function even when enqueued
- Override theme style with other CSS on a specific page
- Will the latest Bootstrap work properly with the default WordPress jQuery?
- Rhyzz Repeatable-fields javascript in php and wordpress
- WordPress + BlockUI or a splash page [closed]
- Return an array from get_terms and store as JavaScript array for search autocomplete
- Dukapress jQuery(“form.product_update”).livequery is not a function [closed]
- Which jQuery packages are included in WordPress 3.1.2?
- Good Solution for Adding jQuery Tabs Anywhere Within WordPress?
- Cannot enqueue jQuery correctly using Google CDN
- Adding jQuery UI elements to WordPress page
- Sorting WP Auctions by date/price?
- How to add custon UI jquery & Fancybox script to WP
- jQuery tabs plugin with callback to fetch data
- Jquery UI Google CSS, from where?
- datepicker for custom post type admin
- JQuery UI not loading without explicit loading of jQuery
- Is there a default way in wordpress to create a overlay in the dashboard?
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- Recommended Use of Bootstrap, or JQuery-UI in WP/plugin development?
- Screen Options JavaScript Code
- Drag and Drop Metadata Menu Order
- A carousel slideshow plugin in JavaScript
- jQuery UI Accordion loading very slow
- Theme style overrides the plugin style
- Slide toggle Jquery UI
- jquery Autocomplete
- why does so many javascript libraries are loaded along with my website?
- Dashboard controls have all stopped working
- How can I add a new lib path without call each one on the header?
- Sorting UL Listing Within the TinyMCE Visual Editor in WordPress
- jQuery dialog prints HTML-Tags under WordPress
- using jquery autocomplete in wordpress plugin
- Theme variation conflict with jquery select2 dropdown
- jQuery datepicker not showing on admin menu
- JavaScript sleep/wait before continuing [duplicate]
- Why does my JavaScript code receive a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” error, while Postman does not?
- How to fix the ‘Missing required request header. Must specify one of: origin,x-requested-with’ Ajax Error
- how to loop through JSON array in jQuery?
- jQuery – how to write ‘if not equal to’ (opposite of ==)
- Get element type with jQuery
- I want to enqueue a .js file to my child theme
- Adding jquery and thickbox to WordPress theme
- WooCommerce single product edit flexslider settings
- jquery & ajax getting data to php in wordpress
- AJAX returns response 0
- WordPress Featured Post Slider
- How disable checkbox when listbox value changes in tinymce
- Modify this loop to fit my jQuery slider (slides)
- validate a metabox based on the category that is selected
- wp_mail very slow
- Unable to uncheck checkbox with jquery in wp admin
- Front-end Ajax File Upload
- jQuery ajax call throws an HTTP 302
- Multiple jQuery conflict unsure of why
- Sorting widget control
- How to wp_enqueue_script jQuery inside a Plugin
- jQuery accordion plugin won’t work once used in WP
- Why use admin-ajax.php when loading pages through AJAX?
- Insertng HTML and jQuery into a page that uses the Defaut template
- WP Rest Api / Ajax POST not working when not logged in
- Admin side jquery is not loaded
- WordPress jQuery crash [closed]
- Using Jquery submit with ajax request
- Adding Widgets to Masonry Layouts Correctly – jQuery &&|| PHP
- How to remove jquery migrate on selected posts
- wp not defined at wp.Uploader.prototype
- How to update WordPress jQuery version?
- Version of jQuery In WordPress Failing Security Audit
- How to use $ with externally loaded javascript
- jQuery function not working in WordPress but works in jsfiddle
- wordpress ajax upload media not working
- Bootstrap with separate js File
- How to get this jQuary script working?
- Possibility of creating a folder in the wordpress root install and installing a file there, all via plugin?
- Disable drag metaboxes, create many functions using js not to work!
- value not saving in the form when dynamically creating an input
- wordpress plugin setting page not enqueueing jquery?
- Customize wp-admin form custom fields
- WordPress/jQuery pagination plugin for multiple lists
- Why I am getting double jquery?
- Contact Form 7 – Submit Form not working After Ajax Request [closed]
- Making the Google Maps API non readable