If you want to show Time slots instead of individual times, you can use below code.


Please Note: This is just a SAMPLE code. The required changes can be done by anyone who is technically sound in Java and HTML/CSS coding.


<script>

if (window.location.pathname == "/dologincheckout.html" || window.location.pathname == "/checkoutlogin.html")

{

setInterval(function(){


var removetime = ["12:00 am","12:30 am","01:00 am","01:30 am","02:00 am","02:30 am","03:00 am","03:30 am","04:00 am","04:30 am","05:00 am","05:30 am","06:00 am","06:30 am","07:00 am","07:30 am","08:00 am","08:30 am","09:00 am","09:30 am","10:30 am","11:00 am","11:30 am","12:00 pm","12:30 pm","01:30 pm","02:30 pm","03:00 pm","03:30 pm","04:00 pm","04:30 pm","05:30 pm","06:30 pm","07:00 pm","07:30 pm","08:00 pm","08:30 pm","09:00 pm","09:30 pm","10:00 pm","10:30 pm","11:00 pm","11:30 pm","10:00 am"]; //THIS ARE THE TIME SLOTS YOU DONT WANT TO GET DISPLAYED


var changetime1 = "01:00 pm"; //This are the time slots you want to get replaced. Please make sure that this are not in ABOVE LIST.

var changetime2 = "02:00 pm";

var changetime3 = "05:00 pm";

var changetime4 = "06:00 pm";


jQuery("#deliveryTime option").each(function() {

var text = jQuery(this).text();

if (removetime.indexOf(text) >= 0){

jQuery(this).remove();

}


if(changetime1.indexOf(text) >= 0) {

text = text.replace("01:00 pm", "1:00 PM - 2:30 PM"); //Add timeslots here.

jQuery(this).text(text);

jQuery(this).val(text);

}

if(changetime2.indexOf(text) >= 0) {

text = text.replace("02:00 pm", "2:00 PM - 3:30 PM");

jQuery(this).text(text);

jQuery(this).val(text);

}

if(changetime3.indexOf(text) >= 0) {

text = text.replace("05:00 pm", "5:00 PM - 6:00 PM");

jQuery(this).text(text);

jQuery(this).val(text);

}

if(changetime4.indexOf(text) >= 0) {

text = text.replace("06:00 pm", "6:00 PM - 7:00 PM");

jQuery(this).text(text);

jQuery(this).val(text);

}


});


jQuery(".selectBox-dropdown-menu li a").each(function() {

var text = jQuery(this).text();

if (removetime.indexOf(text) >= 0){

jQuery(this).parent().remove();

}


if(changetime1.indexOf(text) >= 0) {

text = text.replace("01:00 pm", "1:00 PM - 2:30 PM"); //Add timeslots here.

jQuery(this).text(text);

jQuery(this).attr("rel",text);

}

if(changetime2.indexOf(text) >= 0) {

text = text.replace("02:00 pm", "2:00 PM - 3:30 PM");

jQuery(this).text(text);

jQuery(this).attr("rel",text);

}

if(changetime3.indexOf(text) >= 0) {

text = text.replace("05:00 pm", "5:00 PM - 6:00 PM");

jQuery(this).text(text);

jQuery(this).attr("rel",text);

}

if(changetime4.indexOf(text) >= 0) {

text = text.replace("06:00 pm", "6:00 PM - 7:00 PM");

jQuery(this).text(text);

jQuery(this).attr("rel",text);

}

});

},500);

}

</script>