Sto cercando di inserire sul mio sito lo script Quicksand, ma non è riuscito male.
Firebug mi dà questo errore: 65 Uncaught TypeError: Cannot call method 'split' of undefined
:
TypeError Uncaught: Non è possibile chiamare il metodo 'split' undefined
per questo script:
jQuery.noConflict();
jQuery(document).ready(function($){
// Clone applications to get a second collection
var $data = $("#portfolio-items").clone();
//NOTE: Only filter on the main portfolio page, not on the subcategory pages
$('#portfolio-terms ul li').click(function(e) {
$("ul li").removeClass("active");
// Use the last category class as the category to filter by. This means that multiple categories are not supported (yet)
var filterClass=$(this).attr('class').split(' ').slice(-1)[0];
jquery.custom.js:65 Uncaught TypeError: Cannot call method 'split' of undefined (repeated 6 times)
if (filterClass == '.all current') {
var $filteredData = $data.find('#portfolio-');
} else {
var $filteredData = $data.find('#portfolio-[data-type=' + filterClass + ']');
}
$("#portfolio-items").quicksand($filteredData, {
duration: 800,
easing: 'swing',
});
$(this).addClass("active");
return false;
});
});
Vedi qui: http://stakk.it/
qual è l'errore?
grazie e scusa per il mio pessimo inglese!
Perché pensate che FilterClass potrebbe uguale '.Tutte current'? – Neil