我有这些表
id | tests | results
001 | testId_1 | 1
001 | testId_2 | 1
002 | testId_1 | 1
003 | testId_2 | 1
004 | testId_1 | 1
004 | testId_2 | 1
和
test_id | tests
1234 | testId_1
4565 | testId_2
有没有办法将它们组合起来为NULL
创建一个id
值的新表格,而testId_x
就像 id | tests | results
001 | testId_1 | 1
001 | testId_2 | 1
002 | testId_1 | 1
002 | testId_2 | NULL
003 | testId_1 | NULL
003 | testId_2 | 1
004 | testId_1 | 1
004 | testId_2 | 1
一样
$(window).scroll(function () {
var contentPosition = [];
$('.examples').each(function () { //Get elements that have an id=
contentPosition.push($(this).data('position')); //add id to array
});
var top = contentPosition.offset().top - $(document).scrollTop();
if (top > 400) {
console.log('COMBO BREAKER');
}
});