I have the following function that I want to run on page load and re-run when you click div#trigger. When you click div#trigger everything is fine. However on page load the code
Your function need to be called in document.ready call
$(document).ready(function() { textIndentFunc(); });