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
$(window).on('debouncedresize load', function(){ | |
$('[data-normheights]').each(function(){ | |
var $items = $(this).find($(this).data('normheights')), | |
childFilter = $(this).data('normheights-inner'), | |
tallest = 0, | |
lastYOffset = 0, | |
row = []; | |
$items.each(function(index){ | |
var $img = $(this).find(childFilter); | |
var yOffset = $(this).offset().top; |
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
/* Take an image, or any other element with height/width attrs (e.g. iframe) and stretch it to fill parent | |
* MIT license | |
* | |
* Dependencies: | |
* imagesLoaded: https://github.com/desandro/imagesloaded | |
* | |
* Usage examples: | |
* $('.fillcontainer img.main').willFillParent({ closest: '.fillcontainer', windowEvent: 'debouncedresize load' }); | |
* $('.video-bg > .video').willFillParent({ windowEvent: 'resize' }); | |
* |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |