David, You are correct, that wont work for the input element. Sorry about that. I guess I got focused on the first part of your email and the a element.
I'm wondering if you thought about why the code I provided didn't work? You might want to review the jQuery documentation and the tutorials: - http://docs.jquery.com/Main_Page - http://docs.jquery.com/Tutorials Here's why, because the text attribute doesn't exist for your input tag, it doesn't have a text attribute (ok as enhanced by jQuery). When the input element is created like this, then you'd have to change the value attribute. This would then change the text that is displayed to the user. (Note this also changes the value you'd receive on the server end.) If you had used the <button> element, then changing the text attribute would have worked. Here is some more modified code for you to play. <html> <head> <title>Test Page</title> <script src='jquery.js' type='text/javascript'></script> <script type="text/javascript"> $(function() { $('#frm1').submit( function(event) { event.preventDefault(); event.stopPropagation(); }); $('#btn1').toggle( function(event) { $(this).attr('value','Hide Details'); }, function(event) { $(this).attr('value','More Details'); } ); $('#btn2').toggle( function(event) { $(this).text('Hide Details'); }, function(event) { $(this).text('More Details'); } ); }); </script> </head> <body> <form id='frm1' method='post' action=''> <input id='btn1' type='button' value='More Details' /> <button id='btn2' type='button'>More Details</button> </form> </body> </html> HTH, Joe On Thu, Nov 12, 2009 at 9:30 AM, David pr <davidpric...@gmail.com> wrote: > Thanks but this won't work for a <input type="button" .../> ? > > David >