Created
February 25, 2014 09:20
-
-
Save rnaud/9205568 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$(".search.themes li input").change(function() { | |
var classes = [] | |
$(".search.themes li input:checked").each(function(){ | |
console.log($(this).siblings(".box")) | |
var classList = $(this).siblings(".box").attr('class').split(/\s+/); | |
$.each( classList, function(index, item){ | |
if (item != 'box') { | |
classes.push(item) | |
} | |
}); | |
}); | |
if (classes.length == 0) { | |
$(".eboite").fadeIn(); | |
return; | |
} | |
$(".eboite:not(.pub)").hide(); | |
classes.push("pub"); | |
$.each( classes, function(index, item){ | |
$(".eboite."+item).fadeIn() | |
}); | |
console.log(classes); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment