Skip to content

Instantly share code, notes, and snippets.

@tdouce
Created March 22, 2012 14:14
Show Gist options
  • Save tdouce/2158574 to your computer and use it in GitHub Desktop.
Save tdouce/2158574 to your computer and use it in GitHub Desktop.
Jquery - Toggle distance text app/views/catalogs/_product_feature.rhtml
<script type="text/javascript">
$TB_jq(document).ready(function(){
// Hide all initially
$TB_jq(".distance-description-text").hide();
// Toggle visible and non-visible
$TB_jq('.distance-description').toggle(
function() {
$TB_jq(this).next('.distance-description-text').slideDown('fast');
}, function() {
$TB_jq(this).next('.distance-description-text').hide('fast');
});
});
</script>
<style>
.distance-description {color: #2163AD; padding-left: 2px;}
/* .product-credit .value { width: 225px; } */
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment