-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
blog = {};
blog.comments = blog.comments || {};
blog.comments.debugMode = false;
blog.isFirstLoad = function(namesp, jsFile) {
var isFirst = namesp.firstLoad === undefined;
namesp.firstLoad = false;
if (!isFirst) {
console.log(
"Warning: Javascript file is included twice: " +
jsFile);
}
return isFirst;
};
$(document).ready(function () {
if (!blog.isFirstLoad(blog.comments, "comments.js")) {
return;
}
// normal event handling stuff.
$("#nameIt").click(function(e) {
var name= $("input[type=text]").val();
$("#nameOut")
.append("<div>Hi there " + name + "</div>");
});
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels