Or if you want to use upper case letters in the text, but all lower case filenames:
Code:
<script type="text/javascript">
$(document).on("click",".item", function(e) {
$('#uitkomst').load($(this).text().toLowerCase() + '.php');
e.preventDefault();
});
</script>
But I'm thinking that using this inside the load function might not work. If not, then:
Code:
<script type="text/javascript">
$(document).on("click",".item", function(e) {
var filename = $(this).text().toLowerCase() + '.php';
$('#uitkomst').load(filename);
e.preventDefault();
});
</script>
Bookmarks