init
This commit is contained in:
54
public/frontend/web/scripts/table_special.js
Executable file
54
public/frontend/web/scripts/table_special.js
Executable file
@@ -0,0 +1,54 @@
|
||||
$(document).ready(function(){
|
||||
var nDiv = document.getElementById('t-divN');
|
||||
var hei = nDiv.clientHeight || nDiv.offsetHeight;
|
||||
$('.t-up').css({
|
||||
'height' : hei
|
||||
});
|
||||
|
||||
var divLen = $('#table-box').children();
|
||||
$(divLen[0]).find('div').css({
|
||||
'display' : 'block'
|
||||
});
|
||||
|
||||
for (var i = 0; i < divLen.length; i++) {
|
||||
divLen[i].index = i;
|
||||
}
|
||||
|
||||
var dq = divLen[0];
|
||||
|
||||
for (var i = 0; i < divLen.length; i++) {
|
||||
$(divLen[i]).mouseenter(function(){
|
||||
|
||||
$(dq).find('div').css({
|
||||
'display' : 'none'
|
||||
})
|
||||
if($(this).index == $(dq).index){
|
||||
$(this).find('div').css({
|
||||
'display' : 'block'
|
||||
});
|
||||
}
|
||||
dq = this;
|
||||
});
|
||||
|
||||
|
||||
$(divLen[i]).mouseleave(function(){
|
||||
if($(this).index == $(dq).index){
|
||||
$(this).find('div').css({
|
||||
'display' : 'block'
|
||||
});
|
||||
|
||||
}else{
|
||||
$(this).find('div').css({
|
||||
'display' : 'none'
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
window.onresize = function(){
|
||||
var hei = nDiv.clientHeight || nDiv.offsetHeight;
|
||||
$('.t-up').css({
|
||||
'height' : hei
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user