I am using a toggle on a graphic to slide out a contact form. The problem is, the contact form can cover up the graphic element on low resolutions. I thought a solution would be to include a "close this" inside the form, that would use the same toggle effect. When I add the close this element to the code, instead of working in tandem with the original graphic element, it starts the chain back over, and slides the contact form even further out.
Site is here: http://www.tritonloyaltysupport.com/status
Code for toggle here:
$(this).html(div_form);
//show / hide function
$('div.contactable').toggle(
function() {
$('#overlay').css({display: 'block'});
$('#contactForm').animate({"marginRight": "-=0px"}, "fast");
$('#contactForm').animate({"marginRight": "+=390px"}, "slow");
},
function() {
$('#contactForm').animate({"marginRight": "-=390px"}, "slow");
$('#overlay').css({display: 'none'});
}
);