I’m writing code that will, when a button is clicked, display some simple text (a changes log), and then when clicked again will hide it.
The trick here is that I’d like to keep that change log in a separate file, and call it for display. I’ve got code like follows:
echo "<input type=\"button\" id=\"recentchanges\" value=\"Show/Hide Recent Changes\" /></br><span id=\"changestext\"></span>";
And:
$('#recentchanges').click(function() {
$('#changestext').append(test/recentchanges.txt);
});
So my questions are. 1. How can I hide/show by clicks? It doesn’t look like .toggle() is what I want.. but perhaps it is.. And 2. How can I call data from a separate file? (and as part of that question, should it be a txt file or an html file? Should I have the text formatted with html, or just raw text?)
to your first question
to your second