Click loads template via ajax

So, you’re using wp_localize_script to inject the ajax url. But you didn’t use the localized var handle to access that value. Try this:

/* ... */
$.ajax({
    url: ajaxStuff.ajaxurl, // NOTE use of 'ajaxStuff' object
/* ... */