Estoy tratando de incluir en mi sitio web el script de Quicksand, pero fallé mal.
Firebug me da este error: 65 Uncaught TypeError: Cannot call method 'split' of undefined
:
TypeError no detectado: No se puede llamar al método 'split' de undefined
para este 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;
});
});
Ver aquí: http://stakk.it/
lo que es el error?
gracias y lo siento por mi mal inglés!
¿Por qué piensa que FilterClass podría posiblemente igual '.all current'? – Neil