Trying to initialize a initialized function again to reload my timeline (jquery.timline) events. Unfortunatley it does not work. Any idea how to fix the following?
<script>
var timelinefunction;
$(document).ready(function() {
timelinefunction = function () {
var defaultOpts = {
// "bar" or "point"
type : "bar"
}
$("#TestTimeline").Timeline(defaultOpts);
};
timelinefunction(); // Execute function
// $(document).on("click", "#modal-edit-top-submit-btn", function () { // DONT WORK
$("#modal-edit-top-submit-btn").click(function() {
// $('#TestTimeline').Timeline('destroy')
$('#TestTimeline').empty();
timelinefunction();
});
});
</script>