Menu
Hi! I’m new here in Webdevelopers.com, it seems to be a great forum! I hope I can get some help and help people out :p
I don’t know much about Java and I’m new to JQuery.
I’m creating a website and I want to replace “+ Table” for “- Table” in #button1 a when the user clicks on #table1_head.
For that I’ve used:
[CODE]$(document).ready(function () {
$(‘#table1_head’).click(function () {
$(‘#button1 a’).replaceWith(‘- Table1’);
});
});
It worked. But I want to replace “- Table” back to “+ Table” when the user clicks on it again. How can I do that?
Demo:
[url]http://www.teste442.xpg.com.br/example/