Skip to content

Commit

Permalink
[WebUI IntelliHome#7] Changed javascript to use .iso class
Browse files Browse the repository at this point in the history
  • Loading branch information
skullbocks committed Jul 27, 2014
1 parent 3cbae28 commit 9da5843
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 28 deletions.
43 changes: 17 additions & 26 deletions assets/public/js/isotope_script.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
(function (window, $, undefined) {

$(document).ready(function() {
var $container = $('.iso,#iso');

// Fire Isotope only when images are loaded
$container.imagesLoaded(function(){
$container.isotope({
itemSelector : '.post',
masonry: {
isFitWidth: true,
}
});
});
$("[rel='tooltip']").tooltip();
$('.tile_detail').hammer({}).on("tap", function(event) {
if ( $(this).find('.caption').is( ":hidden" ) ) {
$(this).find('.caption').slideDown( 250 );
} else {
$(this).find('.caption').slideUp( 250 );
}
});
$('.tile_detail').hover(function(){
$(this).find('.caption').slideDown(250);
},
function(){
$(this).find('.caption').slideUp(250);
}
);
var $room = $('.room');
var $container = $('.iso,#iso').isotope({
itemSelector: '.tile-item',
layoutMode: 'fitRows',
getSortData: {
name: '.name',
pinNumber: '.pin-number',
room: '[data-room]',
tag:'[data-tag]'
},
masonry: {
isFitWidth: true,
}
});
$room.click(function() {
$container.isotope({ filter: $( this ).attr('id') });
});
});
})(window, jQuery);
4 changes: 2 additions & 2 deletions assets/public/js/libs/extern.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$(document).ready(function() {
var $container = $('#iso');
var $container = $('.iso,#iso');

// Fire Isotope only when images are loaded
$container.imagesLoaded(function(){
Expand All @@ -14,7 +14,7 @@ $(document).ready(function() {
});

// Infinite Scroll
$('#iso').infinitescroll({
$('.iso,#iso').infinitescroll({
navSelector : 'div.pagination',
nextSelector : 'div.pagination a:first',
itemSelector : '.alert',
Expand Down

0 comments on commit 9da5843

Please sign in to comment.