Jump to content

Changing text


unplugged_web

Recommended Posts

How do I change the text of this?

I'm getting the id of a button (which works) but when I try to change it the console outputs the buttons value instead.
This is what I've got:
$j(this).attr('id');
           var $buttonID = $j(this).val();
           
           $buttonID = $buttonID.replace("change","data");
  console.log($buttonID);
 
if I do this though the alert box shows the buttons id:
    alert($('.change').attr('id'));
 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...