forked from IntelliHome/Google-at-Home
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WebUI IntelliHome#7] Changed javascript to use .iso class
- Loading branch information
skullbocks
committed
Jul 27, 2014
1 parent
3cbae28
commit 9da5843
Showing
2 changed files
with
19 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters