jeudi 1 décembre 2016

how to compile and append the above data at single shot

I am developing a web shift roaster application in that i am creating tables and rows like date , day and shift of the user . Please help me how to compile and append the below data function in a single :

function loadTemplates(data) {
var templateDay = Handlebars.compile($("#template-Day").html());
var templateDate = Handlebars.compile($("#template-Date").html());
var templateUserShift = Handlebars.compile($("#template-UserShift").html());
var shiftPopupInfo = Handlebars.compile($("#template-Popup").html());
                $('#rosterTable tbody').append(templateDay(data));
                $('#rosterTable tbody').append(templateDate(data));
                $('#rosterTable tbody').append(templateUserShift(data));
                $('#shiftPopup').append(shiftPopupInfo(data));
            }
            onClickShiftType();




Aucun commentaire:

Enregistrer un commentaire