I'm trying to read (and then change) the text on two buttons in my
user interface:

<button class="primary approve">Approve selected</button>
<button class="primary reject">Reject selected</button>

Now depending on how many checkboxes (elsewhere) are selected, I want
to change the text to something like "Approve 4 selected"

I'm tried in vain to acess:
$("button.primary").each(function(){
  console.log( $('this').text() );//fails
  console.log( $('this').html() );//fails

});

and for completeness sake I also tried $(this).value -- but of course
it returns the .value attribute of the button.

2 questions:

How do I access the text and change it?
And where is that documented -- link wanted :)

Any help appreciated :)

/Jesper Rønn-Jensen
www.justaddwater.dk

Reply via email to