Last active
December 4, 2015 01:15
-
-
Save varlen/17c590953ea11bebe6ef to your computer and use it in GitHub Desktop.
Use este snippet para esconder as sessões 3D no site da Ingresso.com.
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
// 2015-12-01 - Varlen Pavani Neto | |
// Use este snippet para esconder as sessões 3D do site da Ingresso.com | |
// Esconder todas as sessões 3D | |
var $hateful3dSessions = $('.tipo-sessao.3D').parents('li.place-hours-it'); | |
$hateful3dSessions.hide(); | |
// Esconder os cinemas que só tiverem sessões 3D | |
var $allTheaterSessions = $hateful3dSessions.parent(); | |
$allTheaterSessions.each( function( ) { | |
var $theaterSessions = $( this ); | |
var allSessions = $theaterSessions.children().length; | |
var invisibleSessions = $theaterSessions.children('[style*="display: none"]').length; | |
if ( allSessions == invisibleSessions ) { | |
$theaterSessions.parents('article').hide(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment