Click here to Skip to main content
15,885,869 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello everybody,
I am currently working on a shopping website for online ordering at a restaurant. I have many features working as they should.
But now I am looking into some extra detail. I want to add something like Bootstrap or Foundation, but I have never done this before.
Is adding it like jquery? Just having a script link added to your page? I am very interested in learning bootstrap or some other library that can make your site very responsive and more professional.

Ok Here is the main reason why I want to use something like this.
Right now I have a function determining what the time is, if it is before 10 am the function does not warn the user or do anything, but if it is after 10 a.m. the user is warned about his food before he is allowed to place and order. Right now if you order the food after the cutoff time you will not be allowed to receive that food on the current day. There will be an option so that you can get it tomorrow. I have a window pop up that you can ether press ok or no and that will determine whether you place an order or not.
Right now this messagebox / alert that pops up does not look very nice, actually it is very ugly and all stock with nothing special.
I would like to use bootstrap or some other source to make a messagebox or some sort of alert in a fancy box for the user.
Using some kind of library can spice things up a bit, I am also interested in hearing other suggestions.
Will someone be willing to explain to me how to setup bootstrap or foundation? Also if you know how to use a messagebox like the way I am using it to make it look and work a lot better I would like to hear what you have to say.


JavaScript
function determineCutoffTime() {
	    var cutoffTime = new Date();
	    var actualtime = new Date(cutoffTime.getFullYear(), cutoffTime.getMonth(), cutoffTime.getDate(), 10, 0, 0, 0) - cutoffTime;
	    if (actualtime < 0) {
	        console.log("It's after 10 A.M");
	        var errorCutoffTime = $('#validOrder').innerHTML = "Order must be placed before 10 A.M. to receive food today." // document.getElementById("validOrder").innerHTML
	        if (window.confirm("Do you want to place your order for tomorrow?")) {
	            //make lunchbag
	            makeLunchBag();
	        }
	    } else {
	        console.log("It's before 10 A.M.");
	        //make lunchbag
	        makeLunchBag();
	    }
	}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900