I have a function that will run if any one of the multiple items on the page is clicked. The function works, I just want to know is there a better way of listing this using || or something similar.
This is what I have so far:
Init: function () {
$('#indian-marker a').click(Operations.ShowIndia);
$('#map-2 a').click(Operations.ShowIndia);
$('#details-marker a').click(Operations.ShowIndia);
},
ShowIndia: function () {
$('#map').css('background-image', 'url("../img/map-background-india.jpg")');
$('#map-return').show();
$('#india-box-link').toggle();
$('#global-box-link').toggle();
return false;
}