Javascript Jquery:uncaughttypeerror:Object#<;对象>;没有方法';流沙';
我遇到了“uncaughttypeerror:Object”的例外,它没有“quicksand”方法,我似乎找不到错误的来源。我对jQuery和Java脚本非常陌生,不确定哪里出了问题 我正在尝试实现以下示例: 我用了那段代码,运行了索引文件,我可以看到它运行得很好,所以我只是复制了列表,并获取了他的main.js内容,并将其与我已经获得的功能结合起来:Javascript Jquery:uncaughttypeerror:Object#<;对象>;没有方法';流沙';,javascript,jquery,Javascript,Jquery,我遇到了“uncaughttypeerror:Object”的例外,它没有“quicksand”方法,我似乎找不到错误的来源。我对jQuery和Java脚本非常陌生,不确定哪里出了问题 我正在尝试实现以下示例: 我用了那段代码,运行了索引文件,我可以看到它运行得很好,所以我只是复制了列表,并获取了他的main.js内容,并将其与我已经获得的功能结合起来: $(document).ready(function () { $("#myController").jFlow({ controller:
$(document).ready(function () {
$("#myController").jFlow({ controller: ".jFlowControl", slideWrapper: "#jFlowSlider", slides: "#mySlides", selectedWrapper: "jFlowSelected", width: "960px", height: "350px", duration: 400, prev: ".jFlowPrev", next: ".jFlowNext", auto: true });
$().UItoTop({ easingType: 'easeOutQuart' }); jQuery("a[data-gal^='prettyPhoto']").prettyPhoto({ social_tools: false });
// get the action filter option item on page load
var $filterType = $('#filterOptions li.active a').attr('class');
// get and assign the ourHolder element to the
// $holder varible for use later
var $dataholder = $('ul.ourHolder');
// clone all items within the pre-assigned $holder element
var $data = $dataholder.clone();
// attempt to call Quicksand when a filter option
// item is clicked
$('#filterOptions li a').click(function(e) {
// reset the active class on all the buttons
$('#filterOptions li').removeClass('active');
// assign the class of the clicked filter option
// element to our $filterType variable
var $filterType = $(this).attr('class');
$(this).parent().addClass('active');
if ($filterType == 'all') {
// assign all li items to the $filteredData var when
// the 'All' filter option is clicked
var $filteredData = $data.find('li');
}
else {
// find all li elements that have our required $filterType
// values for the data-type element
var $filteredData = $data.find('li[data-type=' + $filterType + ']');
}
// call quicksand and assign transition parameters
$dataholder.quicksand($filteredData, {
duration: 800,
easing: 'easeInOutQuad',
attribute: "data-id",
});
return false;
});
}
);
"
但我在“$dataholder.quicksand($filteredData,duration:800,easing:'easeInOutQuad')”上得到了一个错误;"
知道需要做什么吗?在前一个副本中包含jQuery结果的第二个副本,并且覆盖了它的所有插件。删除其中一个插件可以解决问题。您是否正确地包含了
quicksand
pluglin?我的PHP文件中有以下内容,路径正确:jQuery.min.jstha的源代码是吗t$dataholder
包含元素。alert($dataholder.length)
如果出现错误,则表示页面上没有正确包含quicksand插件,或者包含jQuery两次。