use the .text() method.
- $("#2").click(function(){
- $("#wrapper").slideToggle(2000);
- $(this).text(function(text){
- return text === "More info" ? "Less info" : "More info";
- });
- });
Additionally, ID's MUST start with an alphabetic character a-z, AND when selecting by ID, do not include the tag name. The text in red above is still invalid and will not work in all browsers.
-- Kevin