How can we edit the code below to bind this function to both myLink and myButton.
if (section === x) {
myButton = $("#a");
myLink = $("#b");
} else {
myButton = $("#c");
myLink = $("#d");
}
myLink.click(function(e) {
e.preventDefault();
showMyDialog();
});