Hi Everyone, I have some java script that work behind a navigation menu, the user clicks the nav button, and some AJAX fires and brings in some HTML, what I want is for if that same link is clicked again then the content that was loaded in by that specific button is removed from the markup.
Does anyone have ideas? My code currently stands at
$("#Blog").click(function (ev) {
ev.preventDefault()
var url = $(this).attr("href");
$.ajax ({
url: "index.php/home/category",
type: "GET",
success : function (html) {
//alert("Success");
$("#accordion").append(html);
}
});
});