Home > front end >  Lazy loading layui elastic layer
Lazy loading layui elastic layer

Time:10-06

Today use layer thickness, suddenly found a bit slower, click can alert immediately after, but the layer thickness will pop up, until the data loading finished quickly met someone? Here is my code,
$(". City_span "). Click (function () {
If ($(this). The parent (.), find (". Taxi_inf ".) length==0) {
alert(1);
Layer. MSG (' data may be loaded slower, please wait, ', {
Time: 20000,//shut down automatically after 20 s
BTN: [' see ', 'know', 'oh']
});
For (var I=0; i<21000; I++) {
Var STR="& lt; Div class='taxi_inf style=' margin - left: 4%; Display: none; Width: 22%; '& gt; Liao A8FJH4 & lt;/i> ";
$(STR). AppendTo (" # asd ")
}
For (var I=0; i<21000; I++) {
Var STR="& lt; Div class='taxi_inf style=' margin - left: 4%; Display: none; Width: 22%; '& gt; Liao B8FJH4 & lt;/i> ";
$(STR). AppendTo (" # asda ")
}
$(this). The parent (). The find (". Taxi_inf "). The CSS (" display ", "")
$(this). The find (". Cityimg "). The CSS (" transform ", "")
} else {
If ($(this). The parent (.), find (". Taxi_inf "). The CSS (" display ")=="none") {
alert(1);
Layer. MSG (' data may be loaded slower, please wait, ', {
Time: 20000,//shut down automatically after 20 s
BTN: [' see ', 'know', 'oh']
});
$(this). The parent (). The find (". Taxi_inf "). The CSS (" display ", "")
$(this). The find (". Cityimg "). The CSS (" transform ", "")
} else {
$(this). The parent (). The find (". Taxi_inf "). The CSS (" display ", "none")
$(this). The find (". Cityimg "). The CSS (" transform ", "the rotate (90 deg)")
}
}

});

CodePudding user response:

To a few big help

CodePudding user response:

Don't understand what you said

CodePudding user response:

Is to click on the layer thickness will be displayed after a div, load data, load data layer after closed, but now click on the layer after not to come out, such as data loading are done only display layer,

CodePudding user response:

I help you look at the private I add my qq

CodePudding user response:

reference 4 floor weixin_43869905 response:
add my qq, I help you look at the private I
qq give me big

CodePudding user response:

Private chat like qq hair not to come out
  • Related