documentar jQuery
$(function(){
// equal to $( document ).ready(function() {
});
Thibaudkhan
$(function(){
// equal to $( document ).ready(function() {
});
// Funções primárias
$(document).ready(function() {
function loadHtmlBySrcdoc(element) {
let srcdoc = element.attr('data-srcdoc');
let htmldoc = $.parseHTML(srcdoc);
element.html(htmldoc);
}
loadHtmlBySrcdoc($(".load-by-srcdoc"));
});
ready(function()
let dataFunction = function(attr, defaultVal, callback=null) {
if (element.attr(attr) != undefined) {
if ($.isFunction(callback)) {
return callback(element.attr(attr));
} else {
return element.attr(attr);
}
} else {
return defaultVal;
}
};