Form conflicts with jquery include

I have a form in a modal window that has stopped functioning. In Chrome we see the following error:

“Uncaught TypeError: Cannot read property ‘top’ of undefined”

It refers to line 43 of the Jquery code block below (I added a comment //line 43 to point out the area in question). Apparently my selection $(“html,body”) is returning something that is null or undefined and it therefore cannot parse the ‘top’ property.

// control form reveal sliders from ‘scripts.js’ include
var calculateFormHeight = $(“.revealer-content”).height();
var suffixPx = “px”;
var finalFormHeight = calculateFormHeight+suffixPx;

$(“.revealer”).animate({height:finalFormHeight}, 500);
$(“html,body”).animate({scrollTop: $(“#sign-up-top”).offset().top}, 500); // Line 43

$(“a.collapse-reveal-sign-up, a.dismiss-reveal-sign-up”).click(function(e){
$(“.revealer-content”).fadeOut( function(){ $(“.revealer”).animate({height:‘0px’ , padding:‘0px’}, 300); } );

To see the issue, go to the following link:

Up top in the main nav … all the way to the right is a red button that reads “Enroll Now” … this link pops up in a Jquery modal box with the form. If you try to submit that form in Chrome, you will see the error I pasted above (feel free to test it, we don’t mind). The Jquery block above does not even control this form per se … it is for forms on other pages and yet is conflicting. When I remove my include (scripts.js with above code) then form submits fine, but we lose the functionality on other pages that uses this code block, so …

Ultimately these two things will need to exist on the same page … I can’t just remove the include from the header.

Does anybody see what is wrong with Line 43? BTW: all above code is nested in a document.ready() code block …

| sc

I don’t see any element id #sign-up-top . Maybe it is the reason why it can’t get object offset for the property “top”?