Easy. But I must admit that I'd probably change a lot more (e.g. use a class instead of show()/hide()
, less IDs, a proper function, etc.), but as that's all you've provided us with. And using event delegation via on
removes the often required domReady
call and allows to reuse the callbacks on e.g. dynamically added content.
$(document)
.on("click", "#DDP_info, #EXW_info, #DDU_info", function(e) {
$("#HideLgf").hide();
})
.on("click", "#LGF_info", function(e) {
$("#HideLgf").show(100);
})
;