Development Blog

September 18, 2013
jQuery agenda table with expand/collapse rows.
jQuery



An agenda page can get long and boring so I used a nifty jQuery script that can expand and collapse the rows.

RAW
<script type="text/javascript">
$(document).ready(function(){
	$(".toggle_container").hide();
	$("div.trigger").click(function(){
		$(this).toggleClass("active").next().slideToggle("slow");
	});
	
	$("#collapse").hide();
	
	$("#expand").click(function(){
		$("div.trigger").addClass("active").next().slideDown("slow");
		$("#expand").hide();
		$("#collapse").show();
		return false;
	});
	
	$("#collapse").click(function(){
		$("div.trigger").removeClass("active").next().slideUp("slow");
		$("#expand").show();
		$("#collapse").hide();
		return false;
	});

        $("#reset_filter").hide();
});

function filter_topic( topic_id ) {
    $(".trigger").hide();
    $(".trigger").removeClass("active");
    $(".toggle_container").hide();
    $(".trigger.topic-"+topic_id).show();
    $(".trigger.topic-"+topic_id).addClass("active");
    $("#reset_filter").show();
}

function reset_filter() {
    $(".trigger").show();
    $(".trigger").addClass("active");
    $(".toggle_container").hide();
    $("#reset_filter").hide();
}
</script>



DEMO
  • WED
  • 8:30 AM–10:00 AM
  • Breakfast
  • Pinpoint Hall
  • Complimentary continental breakfast
  • WED
  • 10:00 AM–12:00 PM
  • Opening Guest Reception
  • Ballroom A
  • WED
  • 12:00 PM–3:00 PM
  • Welcome Remarks
  • Ballroom B
  • Pinpoint's Staff
    Keynote Address
    Sam Luk
Home | Portfolio | Expertise | Clients | People | Contact | Privacy Policy | Copyright Policy
Copyright © 2024 Pinpoint Design LLC. All Rights Reserved.