Whenever the link is hovered over, I need the submit button to move back so that it doesn't overlap with the comment box that appears when the cursor hovers over it.
I tried a solution that worked once, but now I need help making it work every time the submit link is hovered over, not just once.
$( function hideSubmit() {
$('.submit').parent().closest('.submit').on("mouseover", function() {
$('.submit').css("position", "relative");
$('.submit').css("z-index", "-1");
});
$('.commentBox').on("mouseleave", function() {
$('.submit').css("position", "relative");
$('.submit').css("z-index", "999");
});
});
UPDATE: jsfiddle.net/wmygmbc4 Improve question:
The hidden hover comment box is currently blocking the submit button when clicked. I utilized JQuery to address this issue as CSS did not suffice in selecting only the parent class.
My goal is to have the submit button visible when the mouse is not on the sign-up link, and when hovering over the sign-up link, the complete hover box should appear above the submit button.