Currently, I am utilizing jQuery to toggle the visibility of a div by toggling a class on and off.
$('input').focus(function(){
$(this).parents('.row').addClass("linksdiv");
}).blur(function(){
$(this).parents('.row').removeClass("linksdiv");
});
While this method works well for input elements, clicking a link within the linksdiv
causes it to lose focus and disappear. Would it be more effective to use show() and hide() functions instead of relying on CSS?
Will this approach allow the links inside linksdiv
to remain clickable even when inputs are focused? Alternatively, is there a straightforward solution to prevent linksdiv from losing focus upon clicking while still allowing it to vanish on blur?
Thank you in advance for your assistance! You all are truly amazing!
I apologize if my explanation was unclear. Here is what I am attempting to achieve: http://jsfiddle.net/Zw5c2/5/. Special thanks to Patrick for providing this resource!