Isótopo Jquery não funciona
-
11-12-2019 - |
Pergunta
Este é o problema que estou enfrentando - ocorre apenas às vezes: e esta é minha imagem de saída:
preciso de uma saída igual ao estilo Pintrest.
Código:
$(document).ready(function(){
var $container = $('#content');
$container.isotope({
filter: '*',
//layoutMode : '',
animationOptions: {
duration: 750,
easing: 'linear',
queue: false,
}
});
$('#nav a').click(function(){
var selector = $(this).attr('data-filter');
$container.isotope({
filter: selector,
animationOptions: {
duration: 750,
easing: 'linear',
queue: false,
}
});
return false;
});
});
RESOLVIDO:Problema resolvido :)
Solução
Testei no seu site e esta é sua resposta:
$('#content').isotope({
itemSelector:'.isotope-item',
layoutMode: 'fitRows'
});
Altere layoutMode para outros valores disponíveis aqui: http://isotope.metafizzy.co/docs/layout-modes.html
Além disso, seu cabeçalho JS deve ficar assim:
<script type="text/javascript">
$( document ).ready( function() { // Here you listen for the document ready event, when html, css, js are ready
$( '#part1' ).load("home/" , function(){ $('#loading').remove();});
});
//hide frame on resizing the window
$(window).bind('resize load', function(){ // here you listen for resize and load of images, iframes and others
if ($(window).width() < 1349) {
$('#frame').hide();
$('#right').css('width' , '85%');
}
else {
$('#frame').show();
$('#right').css('width' , '72%');
}
});
</script>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow