1
我正在使用一個插件,無法使其工作。在插件中選擇一個塊的孩子
我想打一個容器像this one
如果你點擊一個塊,覆蓋應該移動到一個特定的方向。
但我想要得到的.coverFrame-Container
的孩子每一次,它只是給我的文件+ ' > .cover'
下面的鏈接是我的代碼:
$.fn.coverBlock = function() {
// Settings
var settings = $.extend({
direction: 'up',
speed: 400
});
$(this).click(function() {
element = this;
console.log(this + ' .cover');
});
}
$(function() {
$('.coverFrame').coverBlock();
});
這只是調試了。
控制檯日誌的點擊功能只是給了我這樣的:
file:///G:/wamp/www/training/index.html# .cover
不添加+ ' .cover'
它使我有以下幾點:
<a href="#" class="coverFrame" style="display: block; height: 100px; width: 100px;">...</a>
我怎樣才能解決這個問題,我可以選擇孩子並使用它?