Friday, October 11, 2013

Step Aerobics Group Fitness Class - Calendar : Student Life

Calendar : Student Life




");
//Show more button on hover
$(".more").hover(function() {
$(".more").find("a.button").remove();
$(".more").removeClass("paged");
d = $(this);
$(this).find("h3").after("PreviousNext");
// $(this).append("Next");
$(this).addClass("paged");
activateLinks(d);
activatePagers(d);
});
});

function activateLinks(d) {
fixHeight(d);
$(d).find("a.button").unbind("click");
$(d).find("a.next").click(function(e) {
e.preventDefault();
if (!$(d).find("ul").is(":animated")) {
getNextEvents(d);
}
});
$(d).find("a.previous").click(function(e) {
e.preventDefault();
if ($(d).find("ul:first").css("display") == "none") {
if (!$(d).find("ul").is(":animated")) {
getPrevEvents(d);
}
}
});
}

function getNextEvents(d) {
var f = $(d).find("ul:visible");
var h = f.height();
if (f.next("ul").css("display") == "none") {
//already exists in DOM
animateNextEvents(f,f.next("ul"),h);
}
else {
//fetch with AJAX
$.ajax({
url:"/CentralCalendar/StudentLife.EventCalendar.Web.Partial.GetEventLinks.aspx",
data: "dt=" + d.attr("id") + "&pg=" + d.find('ul').length,
method:"GET",
success:function(r) {
if ($.trim(r) != "")
{
f.after(r);
var l = $(d).find("ul:last");
if(window.popupLib) {
popupLib.bind(l);
}
animateNextEvents(f,l,h);
}
}
});
}
}

function animateNextEvents(f,s,h) {
s.css( {"marginTop" : h} );
s.show();
f.animate({ "marginTop" : "-" + h},"fast","linear",function(){
f.hide();
fixHeight(d);
activatePagers(d);
});
s.animate({ "marginTop" : "0"},"fast","linear");
}

function getPrevEvents(d) {
var c = $(d).find("ul:visible");
var p = c.prev("ul");
var h = c.height();
p.show();
p.animate({ "marginTop" : "0"},"fast","linear");
c.animate({ "marginTop" : h},"fast","linear",function(){
c.hide();
fixHeight(d);
activatePagers(d);
});
}

function fixHeight(d) {
var h = $(d).find("ul:visible").height();
$(d).find("div").animate({"height" : h},"fast");
}


function activatePagers(td) {
var isfirst = $(td).find('ul:visible').hasClass('isfirst');
setButtonActive($(d).find("a.previous"), !isfirst);

var islast = $(td).find('ul:visible').hasClass('islast');
setButtonActive($(d).find("a.next"), !islast);
}

function setButtonActive(b, active) {
if(active) {
b.removeClass('inactive');
b.addClass('active');
} else {
b.removeClass('active');
b.addClass('inactive');
}
}
// Requires JQuery http://jquery.com/
if(window.$ != undefined)
{
$('document').ready(function(){
var dlg = $('#calendar-filter').dialog({
autoOpen:false,
closeOnEscape:true,
modal:true,
width:700});

dlg.parent().appendTo($("#aspnetForm"));

$('#calendar .button-search').click(function(e){
$('#calendar-filter').dialog('open');
});

$('#calendar-filter .button-search-all').click(function(e){
$('#calendar-filter input:text').val('');
$('#calendar-filter input:checkbox').attr('checked','checked');
});

$('#calendar-filter .button-search-clear').click(function(e){
$('#calendar-filter input:text').val('');
$('#calendar-filter input:checkbox').removeAttr('checked');
});

// hide all children nodes.
$(".departments").find("ul").hide();
// set the click event on checkboxes to show/hide child nodes.
$(".departments input").click(function(){
if ($(this).is(":checked"))
$(this).parents("li:eq(0)").find("ul").slideDown("slow");
else
$(this).parents("li:eq(0)").find("ul").slideUp("slow");
});
// show the checked node's child nodes.
$(".departments :checked").each(function(){
$(this).parents("li:eq(0)").find("ul").show();
});
});
}

//]]>









© 2013, Office of Student Life. All rights reserved.
If you have trouble accessing this page and need to request an alternate format, please contact the Student Life web development team at accessibility@studentlife.osu.edu.






Source: http://studentlife.osu.edu/calendar.aspx/2013/10/9/29091/step-aerobics-group-fitness-class
Tags: Claire Danes   trent richardson   friday the 13th   FXX   Espn.com  

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.