Created
October 31, 2011 23:08
-
-
Save dmbean/1329350 to your computer and use it in GitHub Desktop.
dereko2
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
{% block javascripts %} | |
{{ parent() }} | |
{% javascripts | |
'js/jquery.isotope.min.js' | |
filter='?yui_js' | |
output='js/packed/isotope.js' | |
package='versioned' | |
%} | |
<script src="{{ asset_url }}"></script> | |
<script type="text/javascript"> | |
/* Holiday Gift Guide Filtering Functionality */ | |
$('form#filter input').attr('checked', 'true'); | |
$('form#filter input[name="all"]').click(function(e){ | |
$('form#filter input').attr('checked', this.checked); | |
}); | |
$('form#filter input').click(function(e){ | |
$('li.curator-grid-item').hide(); | |
$('form#filter input').each(function(){ | |
var rawCategory = $(this).attr('name'); | |
var curatorClass = "." + rawCategory; | |
var curatorCategory = $('li.curator-grid-item' + curatorClass); | |
var ifChecked = this.checked; | |
//console.log($(this).attr("name")+": "+ this.checked + " (curatorClass: "+curatorClass+")"); | |
if (this.checked){ | |
curatorCategory.show(); | |
} | |
}); | |
}); | |
</script> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment