Commit 8d830b1f authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

register click event on ajax loaded data

parent 1a3ce9bd
Pipeline #114909 passed with stages
in 10 minutes and 20 seconds
......@@ -14,11 +14,7 @@ for (i = 0; i < sURLVariables.length; i++) {
}
};
$( document ).ready(function() {
var entity=getUrlParameter('e');
var pos=$("#"+entity).offset().top - 150;
$("html").animate({ scrollTop: pos }, 1500);
function click () {
$(".load-entity").click(function(e){
var load = e.currentTarget.dataset.load;
$( e.target ).addClass("fa-spin");
......@@ -28,6 +24,24 @@ $( document ).ready(function() {
$( e.target ).parent().parent().after( data );
$( e.target ).parent().parent().remove();});
});
}
$( document ).ready(function() {
var entity=getUrlParameter('e');
var pos=$("#"+entity).offset().top - 150;
$("html").animate({ scrollTop: pos }, 1500);
$(".load-entity").click(function(e){
var load = e.currentTarget.dataset.load;
$( e.target ).addClass("fa-spin");
$.ajax({
url : "api/index/entity/" + load
}).done(function(data) {
$( e.target ).parent().parent().after( data );
$( e.target ).parent().parent().remove();
click();
});
});
//load image from TextGrid Repository
switch($(".registerEintrag")[0].classList[1]) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment