这是一个小提琴的返工(找不到链接:(
原版在瓷砖上有链接,给出了我想象的正是你所追求的。我会多看看我的本地系统但是......啊,混乱。我希望这会有所帮助。
<style>
.element { width: 75px; height: 75px; background: #0FF; margin: 5px; float: left;}
.trans { width: 75px; height: 75px; background: #F0F; margin: 5px; float:left}
.element.searchPali { width: 160px; height: 160px; background: red;}
/* Start: Recommended Isotope styles *//**** Isotope Filtering ****/
.isotope-item { z-index: 2;}
.isotope-hidden.isotope-item { pointer-events: none; z-index: 1;}
/**** Isotope CSS3 transitions ****/
.isotope,.isotope .isotope-item { -webkit-transition-duration: 0.8s; -moz-transition-duration: 0.8s; transition-duration: 0.8s;}
.isotope { -webkit-transition-property: height, width; -moz-transition-property: height, width; transition-property: height, width;}
.isotope .isotope-item { -webkit-transition-property: -webkit-transform, opacity; -moz-transition-property: -moz-transform, opacity; transition-property: transform, opacity;}
/**** disabling Isotope CSS3 transitions ****/
.isotope.no-transition,.isotope.no-transition .isotope-item,.isotope .isotope-item.no-transition { -webkit-transition-duration: 0s; -moz-transition-duration: 0s; transition-duration: 0s;}
/* End: Recommended Isotope styles */
</style>
<table border=1><TR><TD>
<div class="trans">One <a href="#" id="tile-4">link to element D</a></div>
<div class="trans">Two<a href="#" id="tile-3">link to element C</a></div>
</TD><TD>
<div class="trans">Three <a href="#" id="tile-6">link to element F</a></div>
<div class="trans">Four<a href="#" id="tile-7">link to element G</a></div>
</TD></TR></table>
<div id="container" style='width:355px;border:1px solid black'>
<table ><TR><TD>
<div id="1" class="element">A</div>
<div id="2" class="element">B</div>
<div id="3" class="element">C</div>
<div id="4" class="element">D</div>
</TD><TD valign=top>
<div id="5" class="element">E</div>
<div id="6" class="element">F</div>
<div id="7" class="element">G</div>
</TD></TR></table>
</div>
<script src="../../jquery.min.js"></script>
<script src="jquery.isotope.min.js"></script>
<script>
$(function() {
var $container = $('#container'),
$items = $('a');
$container.isotope({ itemSelector: '.element',
masonry: { columnWidth: 85 },
getSortData: {
searchPali: function($item) { return ($item.hasClass('searchPali') ? -1000 : 0) + $item.index(); }
},
sortBy: 'searchPali'
});
$('.trans').click(function(event) {
var $targetID = event.target.id;
$targetID = $targetID.replace('tile-','');
$this=$('#'+$targetID);
var $previoussearch = $('.searchPali');
if (!$this.hasClass('searchPali')) { $this.addClass('searchPali'); }
$previoussearch.removeClass('searchPali');
$container.isotope('updateSortData', $this).isotope('updateSortData', $previoussearch).isotope();
});
});
</script>