My group first started working on implementing a calendar-like app with jQuery. The idea was to create a simple calendar (just the front end of it), where one would be able to choose a date and set an event for that date.
However, later a smaller group (including myself) has broken off and started working on a Wacky Painter app. Here, the idea was to create a bunch of grids and to change the grid color on a
mouseenter event.While I have done a similar application in the past, it was good to see other approaches. Additionally, I learned how to populate a dropdown menu with jQuery. Assuming you have an array of colors and a div named
dropdowns, the function looks like so:window.populateMenu = function(){
$(".dropdowns").find('option').remove();
$(".dropdowns").append('<option value="'+'random'+'">'+'random'+'</option>');
for(i = 0; i < colors.length; i++){
$(".dropdowns").append('<option value="'+colors[i]+'">'+colors[i]+'</option>');
}
}
No comments :
Post a Comment