Is there a way to configure a Javascript(which accepts few parameters) and initialize a function with user specified parameters in an unobtrusive way with data-attributes?
Any reference would be great help
InitializeLogging({
Url: "/xxx/yyyy",
x: 10,
y: true,
somevalue: false,
unHandledErrorCallback: function (message) {
console.log("Somerror message " + message);
}
});
We can achieve that in the following way,
HTML
Script
Demo JS http://jsfiddle.net/DfHXs/2/
Hope this will help you.